Merge pull request #8 from gustavla/master

Fixes syntax error in older versions of graphviz.
This commit is contained in:
Lance Hepler 2014-07-30 21:07:55 -07:00
commit adf18a858a

View File

@ -257,6 +257,10 @@ def needs_quotes(s):
def quote_if_necessary(s): def quote_if_necessary(s):
# Older versions of graphviz throws a syntax error for empty values without
# quotes, e.g. [label=]
if s == '':
return '""'
if isinstance(s, bool): if isinstance(s, bool):
if s is True: if s is True: