Browse code

Fixed: Nodes in dor-file may not have width/height.

Hartmut Goebel authored on 31/05/2010 16:39:30
Showing 1 changed files

  • xdot.py index 1f6f25b..b129797 100755
... ...
@@ -1104,8 +1104,8 @@ class XDotParser(DotParser):
1104 1104
             return
1105 1105
 
1106 1106
         x, y = self.parse_node_pos(pos)
1107
-        w = float(attrs['width'])*72
1108
-        h = float(attrs['height'])*72
1107
+        w = float(attrs.get('width', 0))*72
1108
+        h = float(attrs.get('height', 0))*72
1109 1109
         shapes = []
1110 1110
         for attr in ("_draw_", "_ldraw_"):
1111 1111
             if attr in attrs: