Skip to content

Commit

Permalink
Update .exe's to .zip's following changes at BBS FTP site
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanwhite committed Jan 10, 2014
1 parent 2128756 commit 8e3e2c8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/bbs50stop.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def __init__(self, **kwargs):
self.tags = ["Taxon > Birds", "Spatial Scale > Continental"]
self.urls = {
"counts": "ftp://ftpext.usgs.gov/pub/er/md/laurel/BBS/DataFiles/50-StopData/1997ToPresent_SurveyWide/",
"routes": "ftp://ftpext.usgs.gov/pub/er/md/laurel/BBS/DataFiles/Routes.exe",
"weather": "ftp://ftpext.usgs.gov/pub/er/md/laurel/BBS/DataFiles/Weather.exe",
"routes": "ftp://ftpext.usgs.gov/pub/er/md/laurel/BBS/DataFiles/Routes.zip",
"weather": "ftp://ftpext.usgs.gov/pub/er/md/laurel/BBS/DataFiles/Weather.zip",
"region_codes": "ftp://ftpext.usgs.gov/pub/er/md/laurel/BBS/DataFiles/RegionCodes.txt",
"species": "ftp://ftpext.usgs.gov/pub/er/md/laurel/BBS/DataFiles/SpeciesList.txt"
}
Expand Down Expand Up @@ -224,15 +224,15 @@ def regioncodes_cleanup(value, engine):
try:
engine.table.cleanup = Cleanup()
engine.insert_data_from_archive(self.urls["counts"] +
"Fifty" + part + ".exe",
"Fifty" + part + ".zip",
["fifty" + part + ".csv"])
except:
print "Failed bulk insert on " + part + ", inserting manually."
engine.connection.rollback()
engine.table.cleanup = Cleanup(correct_invalid_value,
nulls=['*'])
engine.insert_data_from_archive(self.urls["counts"] +
"Fifty" + part + ".exe",
"Fifty" + part + ".zip",
["fifty" + part + ".csv"])

except:
Expand Down

0 comments on commit 8e3e2c8

Please sign in to comment.