Derpseh / Spyglass

Nationstates Sheet-generator for easily finding approximate update times
GNU General Public License v3.0
11 stars 10 forks source link

Download dump in CLI mode if not found #36

Closed esfalsa closed 1 year ago

esfalsa commented 1 year ago

Currently, when run in non-interactive mode, Spyglass seems to skip over downloading the latest data dump if it doesn't already exist, which leads to a FileNotFoundError when it then tries to gzip.open that file. This PR automatically downloads the latest dump if none is found when Spyglass is run in non-interactive mode.

I was going to file a bug report for this, but the code change turned out pretty small 😛. Also sorry if this steps on your toes with respect to daily dump download error handling (#33), though I think you were referring to handling errors with the download request/response, while this deals with errors with CLI arguments provided by the user?

AavHRF commented 1 year ago

Lol! I already have code changes staged locally for this with respect to #33, but I'm fine merging this in as it should realistically be patched ASAP as opposed to "whenever I finish other error handling."

Flagging for review, etc.