)
if zmsg.imei is not None and conf.has_section(zmsg.imei):
termconfig = common.normconf(conf[zmsg.imei])
- else:
+ elif conf.has_section("termconfig"):
termconfig = common.normconf(conf["termconfig"])
+ else:
+ termconfig = {}
kwargs = {}
if isinstance(msg, STATUS):
kwargs = {
zpush.send(resp.packed)
except KeyboardInterrupt:
- pass
+ zsub.close()
+ zpush.close()
+ zctx.destroy() # type: ignore
if __name__.endswith("__main__"):