Chttpd generalisation, external data expunge

This commit is contained in:
2019-05-26 21:44:57 +02:00
parent 2134f8850c
commit 0e432a78d7

View File

@@ -166,15 +166,20 @@ class WeatherInfo(object):
try: try:
result_t_ext = [b for b in t_ext][0][0] result_t_ext = [b for b in t_ext][0][0]
except: except:
result_t_ext = 1024
try: try:
result_hum_ext = [x for x in hum_ext][0][0] result_hum_ext = [x for x in hum_ext][0][0]
except: except:
result_hum_ext = 1024
# Put the time to a uhman readable format, strip nanosecs # Put the time to a uhman readable format, strip nanosecs
try:
time_stamp = time.strptime(result_windspeed['time'].split('.')[0], time_stamp = time.strptime(result_windspeed['time'].split('.')[0],
"%Y-%m-%dT%H:%M:%S") "%Y-%m-%dT%H:%M:%S")
except:
time_stamp = time.strptime(result_t_ext['time'].split('.')[0],
"%Y-%m-%dT%H:%M:%S")
result = {} result = {}
# Construct the result to return # Construct the result to return