# HG changeset patch # User Thinker K.F. Li # Date 1295087553 -28800 # Node ID e2d2532c311531cda08758f77b8b799b80111e8c # Parent cbcb91b196fa97c0a5916bccfafc5fd80be498a7 Replace a workaround with a more semantic one. - In old implementation, it has not clear intention in the syntax. - I move the line doing real works into the try-except block to emphasize the intention of skipping scene nodes that is incomplete. diff -r cbcb91b196fa -r e2d2532c3115 pyink/domview.py --- a/pyink/domview.py Sat Jan 15 02:43:20 2011 +0800 +++ b/pyink/domview.py Sat Jan 15 18:32:33 2011 +0800 @@ -235,12 +235,11 @@ continue try: - ref = scene_node.getAttribute('ref') start, end, scene_type = self.parse_one_scene(scene_node) - except: + group_id = scene_node.getAttribute("ref") + except: # the scene node is incompleted. continue - group_id = scene_node.getAttribute("ref") self._group2scene[group_id] = scene_node pass pass