Skip to content

Commit

Permalink
Merge pull request #27 from Derpseh/2.0.3
Browse files Browse the repository at this point in the history
Fix interactive prompt behavior when asking to redownload data dump r…
  • Loading branch information
AavHRF committed Nov 2, 2022
2 parents 5c24e4a + d4c1eef commit a4c83ad
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions Spyglass-cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from xml.etree import ElementTree

# UPDATE THIS EVERY TIME A NEW RELEASE IS PACKAGED
VERSION = "2.0.2"
VERSION = "2.0.3"

# Spyglass
# Source code by Devi aka Panzer Vier
Expand Down Expand Up @@ -200,13 +200,11 @@ def download_dump() -> None:
dump_path = Path("./regions.xml.gz")
if interactive:
if dump_path.exists() and dump_path.is_file():
if (
query(
"Existing data dump found. Do you want to re-download the latest dump? (y/n, defaults to y) ",
["y", "n", ""],
)
== "y"
):
resp = query(
"Existing data dump found. Do you want to re-download the latest dump? (y/n, defaults to y) ",
["y", "n", ""],
)
if resp == "y" or resp == "":
write_log("INFO Found data dump, but re-downloading the latest..")
print("Pulling data dump...")
download_dump()
Expand Down

0 comments on commit a4c83ad

Please sign in to comment.