fix error with -o

This commit is contained in:
eli fessler
2022-11-19 06:14:31 -10:00
parent 452fc0ed0b
commit 4d81806f74

5
s3s.py
View File

@@ -1284,7 +1284,7 @@ def main():
print("That doesn't make any sense! :) Exiting.")
sys.exit(0)
elif outfile and len(sys.argv) > 2:
elif outfile and len(sys.argv) > 2 and "--skipprefetch" not in sys.argv:
print("Cannot use -o with other arguments. Exiting.")
sys.exit(0)
@@ -1305,7 +1305,8 @@ def main():
# export results to file: -o flag
#################################
if outfile:
prefetch_checks(printout=True, skipprefetch=skipprefetch)
if not skipprefetch:
prefetch_checks(printout=True)
print("Fetching your JSON files to export locally. This might take a while...")
# fetch_json() calls prefetch_checks() to gen or check tokens
parents, results, coop_results = fetch_json("both", separate=True, exportall=True, specific=True, skipprefetch=True)