mirror of
https://github.com/frozenpandaman/s3s.git
synced 2026-04-23 09:27:35 -05:00
change i/o checks to use a simple regex for --getseed and -o. The addition of --norefresh could create weird situations with wrong behavior with the old check.
This commit is contained in:
parent
fc5f8cd9fa
commit
cdc6ef6b63
4
s3s.py
4
s3s.py
|
|
@ -1842,7 +1842,7 @@ def main():
|
|||
|
||||
# i/o checks
|
||||
############
|
||||
if getseed and len(sys.argv) > 2 and "--skipprefetch" not in sys.argv and "--norefresh" not in sys.argv:
|
||||
if getseed and any(re.search("^(--getseed|--skipprefetch|--norefresh|[0-9]*)$", arg) is None for arg in sys.argv[1:]):
|
||||
print("Cannot use --getseed with other arguments. Exiting.")
|
||||
sys.exit(0)
|
||||
|
||||
|
|
@ -1854,7 +1854,7 @@ def main():
|
|||
print("That doesn't make any sense! :) Exiting.")
|
||||
sys.exit(0)
|
||||
|
||||
elif outfile and len(sys.argv) > 2 and "--skipprefetch" not in sys.argv and "--norefresh" not in sys.argv:
|
||||
elif outfile and any(re.search("^(-o|--skipprefetch|--norefresh|[0-9]*)$", arg) is None for arg in sys.argv[1:]):
|
||||
print("Cannot use -o with other arguments. Exiting.")
|
||||
sys.exit(0)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user