From cfbba204352e29aaec16fa7d1100bb7f8c08a040 Mon Sep 17 00:00:00 2001 From: Stefan Riesenberger Date: Tue, 8 Mar 2022 18:37:22 +0100 Subject: [PATCH] [tools] fix argument parsing of -s option and cleanup fixes #20 --- gen_png.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gen_png.py b/gen_png.py index 81c70f8..68c1f98 100755 --- a/gen_png.py +++ b/gen_png.py @@ -174,11 +174,7 @@ def main(): raster_graphics(files, sizes) # if "specific" parameter was specified, only render those if args.specific: - if len(sys.argv) == 2: - print("Please specify at least one file!") - sys.exit(1) - - for file in sys.argv: + for file in args.specific: file = file.removeprefix('svg/').removesuffix('.svg') if os.path.exists(f"svg/{file}.svg"): files.append(f"svg/{file}.svg")