Mercurial > public > mercurial-scm > hg
comparison mercurial/scmutil.py @ 16479:fc04698fa778 stable
opener: coding style, use triple quotes for doc string
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Wed, 18 Apr 2012 15:16:15 +0200 |
parents | 154219f3a6a4 |
children | 525fdb738975 2a0efa1112ac |
comparison
equal
deleted
inserted
replaced
16474:ee553e6cd8c4 | 16479:fc04698fa778 |
---|---|
158 def __init__(self, *args, **kwargs): | 158 def __init__(self, *args, **kwargs): |
159 '''Prevent instantiation; don't call this from subclasses.''' | 159 '''Prevent instantiation; don't call this from subclasses.''' |
160 raise NotImplementedError('attempted instantiating ' + str(type(self))) | 160 raise NotImplementedError('attempted instantiating ' + str(type(self))) |
161 | 161 |
162 def tryread(self, path): | 162 def tryread(self, path): |
163 'gracefully return an empty string for missing files' | 163 '''gracefully return an empty string for missing files''' |
164 try: | 164 try: |
165 return self.read(path) | 165 return self.read(path) |
166 except IOError, inst: | 166 except IOError, inst: |
167 if inst.errno != errno.ENOENT: | 167 if inst.errno != errno.ENOENT: |
168 raise | 168 raise |