From: Martin Zimmermann Date: Sat, 29 Dec 2012 20:58:10 +0000 (+0100) Subject: Check for a Node's parent before trying to print its name in __repr__. X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=8c6304e58147ac57daf0c29fea3b45d154a68485;p=packages%2Fb%2Fbup.git Check for a Node's parent before trying to print its name in __repr__. Signed-off-by: Martin Zimmermann Reviewed-by: Zoran Zaric [rlb@defaultvalue.org: Edit commit message.] --- diff --git a/lib/bup/vfs.py b/lib/bup/vfs.py index 59ec5f3..0f9b0a2 100644 --- a/lib/bup/vfs.py +++ b/lib/bup/vfs.py @@ -176,7 +176,7 @@ class Node: def __repr__(self): return "" \ % (self.name, self.hash.encode('hex'), - self.parent.name if self.parent.name else None) + self.parent.name if self.parent else None) def __cmp__(a, b): if a is b: