From 08c549c0c49fe81b581975e185c3a3afb5cd5907 Mon Sep 17 00:00:00 2001 From: Alexander Vasarab Date: Tue, 30 Jun 2020 19:06:39 -0700 Subject: [PATCH] Touch up a few comments (typos, extraneous, etc.) --- infoex-autowx.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/infoex-autowx.py b/infoex-autowx.py index e4befad..598f24c 100755 --- a/infoex-autowx.py +++ b/infoex-autowx.py @@ -180,7 +180,7 @@ except ValueError as exc: # # Also note that the current Auto Wx InfoEx documentation shows these # keys in a graphical table with the "index" beginning at 1, but here we -# are sanely indexing beginning at 0. +# sanely index beginning at 0. fmap = {} ; final_data = [None] * 29 fmap['Location UUID'] = 0 ; final_data[0] = infoex['location_uuid'] fmap['obDate'] = 1 ; final_data[1] = None @@ -323,9 +323,9 @@ elif data['provider'] == 'mesowest': # sort and isolate the most recent, see note above in NRCS for how and # why this is done # - # NOTE: Unlike in the NRCS case, the MesoWest API respones contains all + # NOTE: Unlike in the NRCS case, the MesoWest API response contains all # data (whereas with NRCS, we have to make a separate request for - # each element we want. This is nice for network efficiency but + # each element we want). This is nice for network efficiency but # it means we have to handle this part differently for each. # # NOTE: Also unlike NRCS, MesoWest provides more granular data; NRCS @@ -363,7 +363,7 @@ for elementCd in infoex['wx_data']: # any possible elementCds we may want are any other data # type than float. # - # Another possibility is to query the API with + # Another possibility is to query the API with # getStationElements and temporarily store the # storedUnitCd. But that's pretty network-intensive and # may not even be worth it if there's only e.g. one or two @@ -381,7 +381,6 @@ with open(infoex['csv_filename'], 'w') as f: f.close() if not options.dry_run: - # not a dry run with open(infoex['csv_filename'], 'rb') as f: log.debug("uploading FTP file '%s'" % (infoex['host'])) ftp = FTP(infoex['host'], infoex['uuid'], infoex['api_key']) -- 2.30.2