Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dnsviz/dnsviz.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dnsviz/commands/graph.py')
-rw-r--r--dnsviz/commands/graph.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/dnsviz/commands/graph.py b/dnsviz/commands/graph.py
index 2539e35..54fb4fd 100644
--- a/dnsviz/commands/graph.py
+++ b/dnsviz/commands/graph.py
@@ -408,12 +408,16 @@ class GraphArgHelper:
if name not in self.names:
self.names[name] = None
+def build_helper(logger, cmd, subcmd):
+ arghelper = GraphArgHelper(logger)
+ arghelper.build_parser('%s %s' % (cmd, subcmd))
+ return arghelper
+
def main(argv):
try:
test_pygraphviz()
- arghelper = GraphArgHelper(logger)
- arghelper.build_parser('%s %s' % (sys.argv[0], argv[0]))
+ arghelper = build_helper(logger, sys.argv[0], argv[0])
arghelper.parse_args(argv[1:])
logger.setLevel(logging.WARNING)