diff --git a/wikiteam3/dumpgenerator/cli/cli.py b/wikiteam3/dumpgenerator/cli/cli.py index 37e34647..a2049422 100644 --- a/wikiteam3/dumpgenerator/cli/cli.py +++ b/wikiteam3/dumpgenerator/cli/cli.py @@ -140,7 +140,7 @@ def getArgumentParser(): group_download.add_argument( "--exnamespaces", metavar="1,2,3", - help="comma-separated value of namespaces to exclude", + help="[lack maintenance] comma-separated value of namespaces to exclude", ) group_download.add_argument( "--images", action="store_true", help="Generates an image dump" @@ -501,13 +501,14 @@ def sleep(self, response=None): # Process namespace exclusions if args.exnamespaces: - if re.search(r"[^\d, \-]", args.exnamespaces): + # if re.search(r"[^\d, \-]", args.exnamespaces): + if any([not i.isdigit() for i in args.exnamespaces.split(",")]): print( "Invalid namespace values.\nValid format is integer(s) separated by commas" ) sys.exit(1) else: - ns = re.sub(" ", "", args.exnamespaces) + ns = args.exnamespaces.replace(" ", "") if ns.lower() == "all": print("You cannot exclude all namespaces.") sys.exit(1)