Merge pull request #215 from strohitv/master

Small Bugfix: evaluate --norefresh arg before switching to the --getseed method instead of after
This commit is contained in:
eli 2025-08-19 13:24:57 +09:00 committed by GitHub
commit 732c91e5ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

24
s3s.py
View File

@ -1844,6 +1844,18 @@ def main():
check_statink_key()
set_language()
global DISABLE_REFRESH_RC
DISABLE_REFRESH_RC = None
if rc_value is not None:
try:
DISABLE_REFRESH_RC = int(rc_value)
except ValueError:
print("Number provided for --norefresh must be an integer. Exiting.")
sys.exit(1)
if DISABLE_REFRESH_RC < 0:
print("RC for --norefresh must be 0 or positive! Exiting.")
sys.exit(1)
# i/o checks
############
if getseed and any(re.search("^(--getseed|--skipprefetch|--norefresh|[0-9]+)$", arg) is None for arg in sys.argv[1:]):
@ -1876,18 +1888,6 @@ def main():
print("Minimum number of seconds in monitoring mode is 60. Exiting.")
sys.exit(0)
global DISABLE_REFRESH_RC
DISABLE_REFRESH_RC = None
if rc_value is not None:
try:
DISABLE_REFRESH_RC = int(rc_value)
except ValueError:
print("Number provided for --norefresh must be an integer. Exiting.")
sys.exit(1)
if DISABLE_REFRESH_RC < 0:
print("RC for --norefresh must be 0 or positive! Exiting.")
sys.exit(1)
# export results to file: -o flag
#################################
if outfile: