X-Git-Url: https://wylark.com/src/infoex-autowx.git/blobdiff_plain/2c5f2969e48401870be6f48fc26c497120e371a4..60929fc61a149d50061ba99dfd50d96f83730bc2:/infoex-autowx.py?ds=inline diff --git a/infoex-autowx.py b/infoex-autowx.py index baa8c84..d6e199a 100755 --- a/infoex-autowx.py +++ b/infoex-autowx.py @@ -39,7 +39,7 @@ import zeep import zeep.cache import zeep.transports -__version__ = '2.1.0' +__version__ = '2.2.0' LOG = logging.getLogger(__name__) LOG.setLevel(logging.NOTSET) @@ -114,7 +114,7 @@ def setup_config(config): except KeyError as err: LOG.critical("%s not defined in configuration file", err) - exit(1) + sys.exit(1) # all sections/values present in config file, final sanity check try: @@ -124,7 +124,7 @@ def setup_config(config): raise ValueError except ValueError: LOG.critical("Config value '%s.%s' is empty", key, subkey) - exit(1) + sys.exit(1) return (infoex, station) @@ -316,6 +316,8 @@ def setup_infoex_counterparts_mapping(provider): if provider == 'nrcs': iemap['PREC'] = 'precipitationGauge' iemap['TOBS'] = 'tempPres' + iemap['TMAX'] = 'tempMaxHour' + iemap['TMIN'] = 'tempMinHour' iemap['SNWD'] = 'hS' iemap['PRES'] = 'baro' iemap['RHUM'] = 'rH' @@ -326,6 +328,8 @@ def setup_infoex_counterparts_mapping(provider): elif provider == 'mesowest': iemap['precip_accum'] = 'precipitationGauge' iemap['air_temp'] = 'tempPres' + iemap['air_temp_high_24_hour'] = 'tempMaxHour' + iemap['air_temp_low_24_hour'] = 'tempMinHour' iemap['snow_depth'] = 'hS' iemap['pressure'] = 'baro' iemap['relative_humidity'] = 'rH'