- lat, lon = qry.lookup(msg.mcc, msg.gsm_cells, msg.wifi_aps)
- 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)
+ try:
+ lat, lon = qry.lookup(
+ msg.mcc, msg.mnc, msg.gsm_cells, msg.wifi_aps
+ )
+ 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)