aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/storage/base.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2010-01-18 12:25:17 -0500
committerW. Trevor King <wking@drexel.edu>2010-01-18 12:25:17 -0500
commit7ae29f930fe73adada5174a2ce74266411809ac7 (patch)
treeae850b985fab14974d3eca393907cc3a098156fa /libbe/storage/base.py
parentc7945daa3e1413b7c789df182b39c12dfbe2b4db (diff)
downloadbugseverywhere-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.py10
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