Commit e0147aa7 authored by Vivien Alger's avatar Vivien Alger

Wrong placement of args

parent aada3f6a
...@@ -79,10 +79,6 @@ def parseCli(): ...@@ -79,10 +79,6 @@ def parseCli():
usage = """ %(prog)s <filepath> <xml-path> -s [sections] -opts [options] """ usage = """ %(prog)s <filepath> <xml-path> -s [sections] -opts [options] """
parser = ArgumentParser(prog="kvm_monitor.py", usage=usage) parser = ArgumentParser(prog="kvm_monitor.py", usage=usage)
parser.add_argument("script_name",
help="Script name passed as argument because sys.exit wrapper"
)
parser.add_argument("filepath", parser.add_argument("filepath",
help="Path to the configuration file with the informations" help="Path to the configuration file with the informations"
) )
...@@ -112,10 +108,9 @@ def runMonitor(): ...@@ -112,10 +108,9 @@ def runMonitor():
args = parser.parse_args() args = parser.parse_args()
info_dict = MonitorConfig(args.filepath, info_dict = MonitorConfig(args.filepath,
args.xml_path,
args.sections, args.sections,
args.options args.options
).getConfig() ).getConfig()
serializer = GenerateXMLFile("report.xml",info_dict) serializer = GenerateXMLFile(args.xml_path,info_dict)
serializer.outputFile() serializer.outputFile()
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