/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: John Arbash Meinel
  • Date: 2006-08-16 19:15:19 UTC
  • mto: This revision was merged to the branch mainline in revision 1937.
  • Revision ID: john@arbash-meinel.com-20060816191519-7d0519e2499ef34c
reverting changes to errors.py and local transport.

Show diffs side-by-side

added added

removed removed

Lines of Context:
216
216
class PathError(BzrNewError):
217
217
    """Generic path error: %(path)r%(extra)s)"""
218
218
 
219
 
    extra = ''
220
 
 
221
219
    def __init__(self, path, extra=None):
222
220
        BzrNewError.__init__(self)
223
221
        self.path = path
224
 
        # evaluate extra later, because we raise NoSuchFile a lot
225
 
        # and most times we don't care about this yet.
226
 
        self._extra = extra
227
 
 
228
 
    def __str__(self):
229
 
        if self._extra:
230
 
            self.extra = ': ' + str(self._extra)
231
 
        return BzrNewError.__str__(self)
 
222
        if extra:
 
223
            self.extra = ': ' + str(extra)
 
224
        else:
 
225
            self.extra = ''
232
226
 
233
227
 
234
228
class NoSuchFile(PathError):
298
292
 
299
293
    def __init__(self, path):
300
294
       import bzrlib.urlutils as urlutils
301
 
       path = urlutils.unescape_for_display(path, 'ascii')
302
 
       PathError.__init__(self, path=path, extra=None)
303
 
       self._extra = None
 
295
       self.path = urlutils.unescape_for_display(path, 'ascii')
304
296
 
305
297
 
306
298
class AlreadyBranchError(PathError):