Chttpd generalisation, external data expunge
This commit is contained in:
@@ -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
|
||||||
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")
|
"%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
|
||||||
|
|||||||
Reference in New Issue
Block a user