Commit 8cdbd13c authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Fix handling of options that take no arguments, when graph-tool is loaded as a module

parent e7e90c35
......@@ -922,7 +922,11 @@ else:
["%s='%s'" % (k,str(v)) for k,v in kwargs.iteritems() \
if (opt.suboptions[k].group_name == None or v == True) and v.__class__ == str ]))
arg = "|".join(arg)
return run(["--%s=%s" % (opt.name, arg)], return_first = True)
if arg != "":
cmd = "--%s=%s" % (opt.name, arg)
else:
cmd = "--%s" % opt.name
return run([cmd], return_first = True)
def populate_module():
"""This will populate the module with the command line options as functions"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment