From c15fdb15c4f27821f318d94fa60120bc1511ac3b Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sun, 8 Aug 2010 13:15:36 +0000 Subject: [PATCH] No need to crash, just warn, on dup nodes svn: r15684 --- src/gui/views/treemodels/treebasemodel.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/views/treemodels/treebasemodel.py b/src/gui/views/treemodels/treebasemodel.py index bb3377c3c..f65bb858a 100644 --- a/src/gui/views/treemodels/treebasemodel.py +++ b/src/gui/views/treemodels/treebasemodel.py @@ -102,7 +102,7 @@ class Node(object): if not self.handle: self.handle = handle else: - raise ValueError, 'attempt to add twice a node to the model' + print 'WARNING: attempt to add twice a node to the model' def add_child(self, node, nodemap): """ @@ -590,8 +590,9 @@ class TreeBaseModel(gtk.GenericTreeModel): Otherwise, a node should never be added twice! """ if not self.group_can_have_handle: - raise ValueError, 'Attempt to add node twice to the model (%s:%s)' \ - % (str(parent), str(child)) + print ('WARINING: Attempt to add node twice to the model (%s: %s)' + % (str(parent), str(child))) + return if handle: node.set_handle(handle) if not self._in_build: