LOG.critical("%s is not a valid timezone", tz)
sys.exit(1)
+ if station['units'] not in ['metric', 'english', 'american']:
+ print("Please specify either metric, english, or american for the units.")
+ sys.exit(1)
+
# By default, fetch three hours of data
#
# If user wants hn24 or wind averaging, then
hn24 = 0.0
if hn24 is not None:
- remote_data['hn24'] = hn24
+ if station['hn24']:
+ remote_data['hn24'] = hn24
return remote_data
wind_direction_avg = sum(wind_direction_values) / len(wind_direction_values)
if hn24 is not None:
- remote_data['hn24'] = hn24
+ if station['hn24']:
+ remote_data['hn24'] = hn24
# overwrite the following with the respective averages, if
# applicable