# HG changeset patch # User Paul Boddie # Date 1334789326 -7200 # Node ID e32df1f28c446051352e0a624c8556c9455fd72e # Parent 27d0b30ffd5481c68443e8094d0f7b082f547a15 Since an existing graph may cause the dictionary of graph attributes to have a width and height of None (the value given to a non-matching regular expression group when looking for appropriate attachment filenames), the test for dimensions needs to reject such present but "false" attributes. diff -r 27d0b30ffd54 -r e32df1f28c44 parsers/graphviz.py --- a/parsers/graphviz.py Thu Mar 22 23:11:54 2012 +0100 +++ b/parsers/graphviz.py Thu Apr 19 00:48:46 2012 +0200 @@ -303,7 +303,7 @@ "Return a (width, height) tuple using the 'attrs' dictionary." - if attrs and attrs.has_key("width") and attrs.has_key("height"): + if attrs and attrs.get("width") and attrs.get("height"): return attrs["width"], attrs["height"] else: return None