diff options
author | Damien Couroussé <damien.courousse@gmail.com> | 2013-01-04 23:00:43 +0100 |
---|---|---|
committer | Damien Couroussé <damien.courousse@gmail.com> | 2013-01-04 23:00:43 +0100 |
commit | 9bf89651bf665a59d0817fe2c5f4d821803264e7 (patch) | |
tree | 7a80455bb0684c44b3cc6d87c84f6e88bbfc7ac0 /larch | |
parent | 989eb64fc8be4261f5b1ceaec6b91e97395fa336 (diff) | |
download | larch-9bf89651bf665a59d0817fe2c5f4d821803264e7.tar.gz |
(minor) report node numbers in hex format in order to match with filenames
Diffstat (limited to 'larch')
-rw-r--r-- | larch/nodestore.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/larch/nodestore.py b/larch/nodestore.py index fb0abe0..fb660cc 100644 --- a/larch/nodestore.py +++ b/larch/nodestore.py @@ -28,7 +28,7 @@ class NodeMissing(larch.Error): error_msg = (': %s: %s: %s' % (error.errno, error.strerror, error.filename)) self.msg = ('Node %d cannot be found in the node store %s%s' % - (node_id, node_store, error_msg)) + (hex(node_id).lstrip("0x"), node_store, error_msg)) class NodeTooBig(larch.Error): @@ -45,7 +45,7 @@ class NodeExists(larch.Error): '''User tried to put a node that already exists in the store.''' def __init__(self, node_id): - self.msg = 'Node %d is already in the store' % node_id + self.msg = 'Node %d is already in the store' % hex(node_id).lstrip("0x") class NodeCannotBeModified(larch.Error): @@ -53,7 +53,7 @@ class NodeCannotBeModified(larch.Error): '''User called start_modification on node that cannot be modified.''' def __init__(self, node_id): - self.msg = 'Node %d cannot be modified' % node_id + self.msg = 'Node %d cannot be modified' % hex(node_id).lstrip("0x") class NodeStore(object): # pragma: no cover |