Skip to content

Commit

Permalink
correct argparse usage ref #14103
Browse files Browse the repository at this point in the history
Signed-off-by: m-kro <m.barthauer@t-online.de>
  • Loading branch information
m-kro committed Jan 3, 2024
1 parent 99378c2 commit b4f6ed7
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tools/visualization/macrOutput.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

# @file macrOutput.py
# @author Amirhosein Karbasi
# @author Mirko Barthauer
# @date 2021-04-20


Expand All @@ -34,13 +35,9 @@
def main(args=None):

ap = sumolib.options.ArgumentParser()
ap.add_argument("file", dest="file", category="input", type=ap.file, required=True, help="An XML input file")
ap.add_argument("file", category="input", type=ap.file, help="An XML input file")
options = ap.parse_args(args=args)

if args is None or len(args) < 2:
print("Error: An xml file must be given as input")
sys.exit(1)

df = pdx.read_xml(options.file, ['meandata'])

df = pdx.flatten(df)
Expand Down

0 comments on commit b4f6ed7

Please sign in to comment.