Commit 2bdde423 authored by Robin Obůrka's avatar Robin Obůrka Committed by Robin Obůrka

network: Remove duplicate code

parent 38d434e6
...@@ -171,10 +171,15 @@ class SN: ...@@ -171,10 +171,15 @@ class SN:
## Gather data ## Gather data
self.context = ctx self.context = ctx
## This is small hack to make the whole module ready for black-box tests
args_to_parse = None
if "args" in options:
args_to_parse = options["args"]
if argparser: if argparser:
self.args = argparser.parse_args(options["args"] if "args" in options else None) self.args = argparser.parse_args(args_to_parse)
else: else:
self.args = get_arg_parser().parse_args(options["args"] if "args" in options else None) self.args = get_arg_parser().parse_args(args_to_parse)
## Build all necessary configuration ## Build all necessary configuration
self.build_global_configuration() self.build_global_configuration()
......
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