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