- continue
- lat, lon = qry_cell(
- conf["opencellid"]["dbfn"], msg.mcc, msg.gsm_cells
- )
- resp = Resp(imei=zmsg.imei, packet=msg.Out(lat=lat, lon=lon).packed)
- log.debug("Response for lat=%s, lon=%s: %s", lat, lon, resp)
- zpush.send(resp.packed)
+ resp = Resp(
+ imei=zmsg.imei,
+ when=zmsg.when, # not the current time, but the original!
+ packet=msg.Out(latitude=lat, longitude=lon).packed,
+ )
+ log.debug("Response for lat=%s, lon=%s: %s", lat, lon, resp)
+ zpush.send(resp.packed)
+ except Exception as e:
+ log.warning("Lookup for %s resulted in %s", msg, e)