parse address as a numeric field
This commit is contained in:
parent
ba9a9096bf
commit
976c15d29a
@ -5,4 +5,6 @@ class PocsagParser(Parser):
|
|||||||
def parse(self, raw):
|
def parse(self, raw):
|
||||||
fields = raw.decode("ascii", "replace").rstrip("\n").split(";")
|
fields = raw.decode("ascii", "replace").rstrip("\n").split(";")
|
||||||
meta = {v[0]: "".join(v[1:]) for v in map(lambda x: x.split(":"), fields) if v[0] != ""}
|
meta = {v[0]: "".join(v[1:]) for v in map(lambda x: x.split(":"), fields) if v[0] != ""}
|
||||||
|
if "address" in meta:
|
||||||
|
meta["address"] = int(meta["address"])
|
||||||
self.handler.write_pocsag_data(meta)
|
self.handler.write_pocsag_data(meta)
|
||||||
|
Loading…
Reference in New Issue
Block a user