Skip to content

Commit

Permalink
chore: show --force tip if found exists IA item
Browse files Browse the repository at this point in the history
  • Loading branch information
yzqzss committed Jul 11, 2024
1 parent 05959bf commit 5a91db1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion wikiteam3/dumpgenerator/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def getArgumentParser():
help="Export XML dump using Special:Export (index.php). (supported with --curonly)",
)
group_download.add_argument(
"--curonly", action="store_true", help="store only the lastest revision of pages"
"--curonly", action="store_true", help="store only the latest revision of pages"
)
group_download.add_argument(
"--xmlapiexport",
Expand Down
6 changes: 2 additions & 4 deletions wikiteam3/dumpgenerator/dump/generator.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import contextlib
import os
import re
import subprocess
import sys
import traceback
from typing import Dict, Union

from file_read_backwards import FileReadBackwards

Expand Down Expand Up @@ -73,7 +70,8 @@ def __init__(params=None):
config = load_config(config=config, config_filename=config_filename)
else:
if not other.force and any_recent_ia_item_exists(config, days=365):
print("A dump of this wiki was uploaded to IA in the last 365 days. Aborting.")
print("A dump of this wiki was uploaded to IA in the last 365 days.")
print("If you want to generate a new dump, use --force")
sys.exit(88)

os.mkdir(config.path)
Expand Down

0 comments on commit 5a91db1

Please sign in to comment.