mirror of
https://github.com/craigerl/aprsd.git
synced 2024-09-28 08:06:37 -04:00
Put in a fix for aprslib parse exceptions
This patch adds a fix for the aprslib consumer function to ensure that we don't bail when logging a ParseError
This commit is contained in:
parent
ed4995b6eb
commit
840c8a990e
@ -224,11 +224,21 @@ class Aprsdis(aprslib.IS):
|
|||||||
self.logger.debug("Server: %s", line.decode("utf8"))
|
self.logger.debug("Server: %s", line.decode("utf8"))
|
||||||
stats.APRSDStats().set_aprsis_keepalive()
|
stats.APRSDStats().set_aprsis_keepalive()
|
||||||
except ParseError as exp:
|
except ParseError as exp:
|
||||||
self.logger.log(11, "%s\n Packet: %s", exp.args[0], exp.args[1])
|
self.logger.log(
|
||||||
|
11,
|
||||||
|
"%s\n Packet: %s",
|
||||||
|
exp,
|
||||||
|
exp.packet,
|
||||||
|
)
|
||||||
except UnknownFormat as exp:
|
except UnknownFormat as exp:
|
||||||
self.logger.log(9, "unknown format %s", exp.args)
|
self.logger.log(
|
||||||
|
9,
|
||||||
|
"%s\n Packet: %s",
|
||||||
|
exp,
|
||||||
|
exp.packet,
|
||||||
|
)
|
||||||
except LoginError as exp:
|
except LoginError as exp:
|
||||||
self.logger.error("%s: %s", exp.__class__.__name__, exp.args[0])
|
self.logger.error("%s: %s", exp.__class__.__name__, exp)
|
||||||
except (KeyboardInterrupt, SystemExit):
|
except (KeyboardInterrupt, SystemExit):
|
||||||
raise
|
raise
|
||||||
except (ConnectionDrop, ConnectionError):
|
except (ConnectionDrop, ConnectionError):
|
||||||
|
Loading…
Reference in New Issue
Block a user