Skip to content

Commit

Permalink
Merge pull request #204 from ymorin-orange/yem/gh-198-203
Browse files Browse the repository at this point in the history
python: fix issues 198 & 203
  • Loading branch information
ymorin-orange authored Nov 8, 2024
2 parents a962a88 + 3773040 commit d183c04
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion python/its-status/its_status/collector.cellular.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ def capture(self):
"code": m_j["modem"]["3gpp"]["operator-code"],
"name": m_j["modem"]["3gpp"]["operator-name"],
}
tech = m_j["modem"]["generic"]["access-technologies"][0]
try:
# We might not yet know what technology is used...
tech = m_j["modem"]["generic"]["access-technologies"][0]
except KeyError:
tech = None
item["connection"] = {
"technology": tech,
"signal": [],
Expand Down
2 changes: 1 addition & 1 deletion python/its-vehicle/its_vehicle/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def msg_cb(
payload_d.get("source_uuid", None) != self.cfg["instance-id"]
or self.cfg["mirror-self"]
):
self.mqtt_mirror.publish(topic, payload)
self.mqtt_mirror.publish(topic=topic, payload=payload)
except:
# Payload does not have expected fields, or is not a dict;
# ignore this invalid message
Expand Down

0 comments on commit d183c04

Please sign in to comment.