From 58feec6ec7d40769ab1b9815a01ae90d2222eefa Mon Sep 17 00:00:00 2001 From: Stefan Riesenberger Date: Fri, 4 Feb 2022 13:00:17 +0100 Subject: [PATCH] [util] improve resolution error handling --- gen_png.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/gen_png.py b/gen_png.py index 70ff062..08e9a4a 100755 --- a/gen_png.py +++ b/gen_png.py @@ -101,14 +101,10 @@ def main(): # this will error out on invalid argument configurations args = parser.parse_args() - sizes = None for res in args.resolution or []: - print(f"asd{res}") if res > 0 and res < 2147483647: - if not sizes: - sizes = [] - sizes.append(res) - + print("Resolutions have to be in the range of 0 < R > 2147483647!") + sizes = args.resolution files = [] # if "git" parameter was specified, regenerate since last tag + create git commit