comparison pyink/domview.py @ 1269:97302d2a0a1d

Raise an error for the error. - Never silent fault - If it is fault, it should be fault. - Don't make fault silent. - fix the fault. - the ID should be in the map, but it is not. It is really a fault.
author Thinker K.F. Li <thinker@codemud.net>
date Wed, 12 Jan 2011 20:59:38 +0800
parents ca301f6abef7
children ef1f16beef21
comparison
equal deleted inserted replaced
1268:cd848c2ec29f 1269:97302d2a0a1d
102 child_id = child.getAttribute('id') 102 child_id = child.getAttribute('id')
103 except: 103 except:
104 pass 104 pass
105 else: 105 else:
106 if child_id not in self._id2node: 106 if child_id not in self._id2node:
107 return 107 raise ValueError, \
108 'remove a node that is never known (%s)' % (child_id)
108 del self._id2node[child_id] 109 del self._id2node[child_id]
109 pass 110 pass
110 111
111 if child.name() == 'ns0:scene': 112 if child.name() == 'ns0:scene':
112 try: 113 try: