Commit 17c82106 authored by Conor Anderson's avatar Conor Anderson

Fix error

parent 10af2322
Pipeline #45909969 failed with stages
in 3 minutes and 6 seconds
......@@ -83,20 +83,18 @@ def guess_skip(filename):
@lru_cache()
def get_inventory(force=False):
filename = "Station Inventory EN.csv"
if not os.path.isfile(filename):
if force:
print("Downloading", os.path.basename(filename), "to",
os.path.dirname(filename) if os.path.dirname(filename) != '' else "current working directory")
print("Downloading", filename), "to the current working directory")
download_file("ftp://[email protected]/Pub/Get_More_Data_Plus_de_donnees/Station%20Inventory%20EN.csv",
filename)
else:
warn("Cannot find the station inventory in the current working directory.",
warn("Cannot find the station inventory in the current working directory",
"The data will be cached for this session. If running from the command-line,",
"consider downloading the data with: \"ec3 inv\".")
filename =os.path.join(tempdir(), filename)
print("Downloading", os.path.basename(filename), "to",
os.path.dirname(filename) if os.path.dirname(filename) != '' else "current working directory")
filename = os.path.join(tempdir(), filename)
print("Downloading", os.path.basename(filename), "to", os.path.dirname(filename))
download_file("ftp://[email protected]/Pub/Get_More_Data_Plus_de_donnees/Station%20Inventory%20EN.csv",
filename)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment