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:
result_t_ext = [b for b in t_ext][0][0]
except:
result_t_ext = 1024
try:
result_hum_ext = [x for x in hum_ext][0][0]
except:
result_hum_ext = 1024
# Put the time to a uhman readable format, strip nanosecs
time_stamp = time.strptime(result_windspeed['time'].split('.')[0],
try:
time_stamp = time.strptime(result_windspeed['time'].split('.')[0],
"%Y-%m-%dT%H:%M:%S")
except:
time_stamp = time.strptime(result_t_ext['time'].split('.')[0],
"%Y-%m-%dT%H:%M:%S")
result = {}
# Construct the result to return