X-Git-Url: http://www.average.org/gitweb/?p=loctrkd.git;a=blobdiff_plain;f=gps303%2Ftermconfig.py;h=953e6aec75f67ae380732d7f80dcfcc4cfa845ed;hp=eb3150b49a17065aed2fc1d8898bc80ffa4e28b7;hb=428cb6396a46338d3681fca111f983cd5f8876d5;hpb=bd031f87f4d3f640ce8862271aa69107f31a06d5 diff --git a/gps303/termconfig.py b/gps303/termconfig.py index eb3150b..953e6ae 100644 --- a/gps303/termconfig.py +++ b/gps303/termconfig.py @@ -14,7 +14,6 @@ log = getLogger("gps303/termconfig") def runserver(conf: ConfigParser) -> None: - termconfig = common.normconf(conf["termconfig"]) # Is this https://github.com/zeromq/pyzmq/issues/1627 still not fixed?! zctx = zmq.Context() # type: ignore zsub = zctx.socket(zmq.SUB) # type: ignore @@ -43,6 +42,10 @@ def runserver(conf: ConfigParser) -> None: log.error( "%s does not expect externally provided response", msg ) + if zmsg.imei is not None and conf.has_section(zmsg.imei): + termconfig = common.normconf(conf[zmsg.imei]) + else: + termconfig = common.normconf(conf["termconfig"]) kwargs = {} if isinstance(msg, STATUS): kwargs = {