[svn r57594] * adding tracing to dsession and master/slave communication

(enable with --tracedir)
* factor slave loop into a class
* add comment to pickling

--HG--
branch : trunk
This commit is contained in:
hpk
2008-08-22 23:14:43 +02:00
parent a6f1e3d82f
commit 354feff9a6
6 changed files with 86 additions and 34 deletions

View File

@@ -114,12 +114,18 @@ class Node(object):
return (self.name, self.parent)
def __setstate__(self, (name, parent)):
newnode = parent.join(name)
assert newnode is not None, (self, name, parent)
if newnode is None:
raise AssertionError(self, name, parent, parent.__dict__)
self.__dict__.update(newnode.__dict__)
#self.__init__(name=name, parent=parent)
def __repr__(self):
return "<%s %r>" %(self.__class__.__name__, getattr(self, 'name', None))
if self._config.option.debug:
return "<%s %r %0x>" %(self.__class__.__name__,
getattr(self, 'name', None), id(self))
else:
return "<%s %r>" %(self.__class__.__name__,
getattr(self, 'name', None))
# methods for ordering nodes