From 484bd933ebeb953a6ffadfafb36992095d0a0446 Mon Sep 17 00:00:00 2001 From: Stefan Riesenberger Date: Fri, 4 Feb 2022 12:52:20 +0100 Subject: [PATCH] [util] add range check to --resolution option and add contributors to copyright --- gen_png.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/gen_png.py b/gen_png.py index 056e1eb..70ff062 100755 --- a/gen_png.py +++ b/gen_png.py @@ -1,7 +1,8 @@ #!/usr/bin/env python3 ########################################################################### -# Copyright (C) 2022 Stefan Riesenberger +# Copyright (C) 2022 Stefan Riesenberger, Miepee, famfo +# # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -99,8 +100,15 @@ def main(): "Requires 'git' to be installed and located in PATH.") # 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) - sizes = args.resolution # this is None when no argument is supplied files = [] # if "git" parameter was specified, regenerate since last tag + create git commit