From: Moritz Warning Date: Thu, 13 Feb 2020 11:27:04 +0000 (+0100) Subject: allow to use includes only X-Git-Tag: v1.0.0~16 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=bfc7469f364f4a307dba8b13403d36f7720eb182;p=web%2Ffirmware-selector-openwrt-org.git allow to use includes only --- diff --git a/misc/collect.py b/misc/collect.py index 2a89458..9b75351 100755 --- a/misc/collect.py +++ b/misc/collect.py @@ -7,8 +7,8 @@ import sys import os parser = argparse.ArgumentParser() -parser.add_argument("input_path", help="Input folder that is traversed for OpenWrt JSON device files.") -parser.add_argument('--link', required = True, +parser.add_argument("input_path", nargs='?', help="Input folder that is traversed for OpenWrt JSON device files.") +parser.add_argument('--link', action="store", dest="link", default="", help="Link to get the image from. May contain %%file, %%target, %%release and %%commit") parser.add_argument('--include', nargs='+', default=[], @@ -78,7 +78,6 @@ for path in paths: sys.stderr.write("Abort on {}\n Missing key {}\n".format(path, e)) exit(1) - # include JSON data from other files for path in args.include: with open(path, "r") as file: