diff options
author | W. Trevor King <wking@drexel.edu> | 2010-01-18 12:25:17 -0500 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2010-01-18 12:25:17 -0500 |
commit | 7ae29f930fe73adada5174a2ce74266411809ac7 (patch) | |
tree | ae850b985fab14974d3eca393907cc3a098156fa /libbe/storage/base.py | |
parent | c7945daa3e1413b7c789df182b39c12dfbe2b4db (diff) | |
download | bugseverywhere-7ae29f930fe73adada5174a2ce74266411809ac7.tar.gz |
Added VCS._u_find_id_from_manifest for faster id->path calculation
Diffstat (limited to 'libbe/storage/base.py')
-rw-r--r-- | libbe/storage/base.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libbe/storage/base.py b/libbe/storage/base.py index 84ec1d4..10649a8 100644 --- a/libbe/storage/base.py +++ b/libbe/storage/base.py @@ -53,11 +53,15 @@ class InvalidStorageVersion(ConnectionError): class InvalidID (KeyError): def __init__(self, id=None, revision=None, msg=None): - if msg == None and id != None: - msg = id - KeyError.__init__(self, msg) + KeyError.__init__(self, id) + self.msg = msg self.id = id self.revision = revision + def __str__(self): + if self.msg == None: + return '%s in revision %s' % (self.id, self.revision) + return self.msg + class InvalidRevision (KeyError): pass |