Skip to content

Commit

Permalink
mark --exnamespaces lack maintenanced
Browse files Browse the repository at this point in the history
  • Loading branch information
yzqzss committed Dec 4, 2024
1 parent 8a05488 commit f2a906c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions wikiteam3/dumpgenerator/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit f2a906c

Please sign in to comment.