From 9bf89651bf665a59d0817fe2c5f4d821803264e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damien=20Courouss=C3=A9?= Date: Fri, 4 Jan 2013 23:00:43 +0100 Subject: (minor) report node numbers in hex format in order to match with filenames --- larch/nodestore.py | 6 +++--- 1 file 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 -- cgit v1.2.1