~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to errors.py

  • Committer: Aaron Bentley
  • Date: 2008-02-13 04:35:59 UTC
  • Revision ID: aaron@aaronbentley.com-20080213043559-rk1rlfx4nb9pfe1l
Handle missing patch, fix tabs

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
 
34
34
class PatchInvokeError(BzrError):
35
35
 
36
 
    _fmt = """Error invoking patch: %(errstr)s\n%(stderr)s"""
 
36
    _fmt = """Error invoking patch: %(errstr)s%(stderr)s"""
37
37
    internal_error = False
38
38
 
39
 
    def __init__(self, e, stderr):
 
39
    def __init__(self, e, stderr=''):
40
40
        self.exception = e
41
41
        self.errstr = os.strerror(e.errno)
42
 
        self.stderr = stderr
 
42
        self.stderr = '\n' + stderr
43
43
 
44
44
 
45
45
class NoColor(Exception):