Tidy up warnings and change error to warning in flat model
svn: r15688
This commit is contained in:
parent
0fb8ef6da4
commit
c0944d5df0
@ -304,8 +304,9 @@ class FlatNodeMap(object):
|
||||
:Returns type: integer or None
|
||||
"""
|
||||
if srtkey_hndl[1] in self._hndl2index:
|
||||
raise ValueError, 'Attempt to add row twice to the model (%s)' % \
|
||||
srtkey_hndl[1]
|
||||
print ('WARNING: Attempt to add row twice to the model (%s)' %
|
||||
srtkey_hndl[1])
|
||||
return
|
||||
if not self._identical:
|
||||
bisect.insort_left(self._fullhndl, srtkey_hndl)
|
||||
if allkeyonly:
|
||||
|
@ -102,7 +102,8 @@ class Node(object):
|
||||
if not self.handle:
|
||||
self.handle = handle
|
||||
else:
|
||||
print 'WARNING: attempt to add twice a node to the model'
|
||||
print ('WARNING: Attempt to add handle twice to the node (%s)' %
|
||||
handle)
|
||||
|
||||
def add_child(self, node, nodemap):
|
||||
"""
|
||||
@ -590,7 +591,7 @@ class TreeBaseModel(gtk.GenericTreeModel):
|
||||
Otherwise, a node should never be added twice!
|
||||
"""
|
||||
if not self.group_can_have_handle:
|
||||
print ('WARINING: Attempt to add node twice to the model (%s: %s)'
|
||||
print ('WARNING: Attempt to add node twice to the model (%s: %s)'
|
||||
% (str(parent), str(child)))
|
||||
return
|
||||
if handle:
|
||||
|
Loading…
x
Reference in New Issue
Block a user