~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Robert Collins
  • Date: 2005-10-05 10:02:53 UTC
  • Revision ID: robertc@robertcollins.net-20051005100252-c0ac69ff83d3ffa2
remove some of the upgrade code that was duplicated with inventory_entry, and give all inventory entries a weave

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
            return self.args[0]
28
28
        elif len(self.args) == 2:
29
29
            # further explanation or suggestions
30
 
            return '\n  '.join([self.args[0]] + self.args[1])
 
30
            try:
 
31
                return '\n  '.join([self.args[0]] + self.args[1])
 
32
            except TypeError:
 
33
                return "%r" % self
31
34
        else:
32
35
            return `self.args`
33
36
 
203
206
 
204
207
class NoSuchFile(TransportError, IOError):
205
208
    """A get() was issued for a file that doesn't exist."""
 
209
 
 
210
    def __str__(self):
 
211
        return self.msg
 
212
 
206
213
    def __init__(self, msg=None, orig_error=None):
207
214
        import errno
208
215
        TransportError.__init__(self, msg=msg, orig_error=orig_error)