Remove default override for desired_data
[infoex-autowx.git] / infoex-autowx.py
index 48a9063ff4137ce25087dca97ab1a25aa328472c..a16b7e61e16947bf72a783c745ea81dbf59059c6 100755 (executable)
@@ -39,7 +39,7 @@ import zeep
 import zeep.cache
 import zeep.transports
 
-__version__ = '2.0.0'
+__version__ = '2.0.1'
 
 LOG = logging.getLogger(__name__)
 LOG.setLevel(logging.NOTSET)
@@ -88,16 +88,7 @@ def setup_config(config):
         if station['provider'] == 'nrcs':
             station['source'] = 'https://www.wcc.nrcs.usda.gov/awdbWebService/services?WSDL'
             station['station_id'] = config['station']['station_id']
-
-            try:
-                station['desired_data'] = config['station']['desired_data'].split(',')
-            except:
-                # desired_data malformed or missing, setting default
-                station['desired_data'] = [
-                                       'TOBS', # AIR TEMPERATURE OBSERVED (degF)
-                                       'SNWD', # SNOW DEPTH (in)
-                                       'PREC'  # PRECIPITATION ACCUMULATION (in)
-                                       ]
+            station['desired_data'] = config['station']['desired_data'].split(',')
 
             # XXX: For NRCS, we're manually overriding units for now! Once
             #      unit conversion is supported for NRCS, REMOVE THIS!
@@ -108,12 +99,7 @@ def setup_config(config):
             station['source'] = 'https://api.synopticdata.com/v2/stations/timeseries'
             station['station_id'] = config['station']['station_id']
             station['units'] = config['station']['units']
-
-            try:
-                station['desired_data'] = config['station']['desired_data']
-            except:
-                # desired_data malformed or missing, setting default
-                station['desired_data'] = 'air_temp,snow_depth'
+            station['desired_data'] = config['station']['desired_data']
 
             # construct full API URL (sans start/end time, added later)
             station['source'] = station['source'] + '?token=' + config['station']['token'] + '&within=60&units=' + station['units'] + '&stid=' + station['station_id'] + '&vars=' + station['desired_data']