X-Git-Url: http://www.average.org/gitweb/?p=loctrkd.git;a=blobdiff_plain;f=gps303%2F__main__.py;h=2ad2ecfea0aaacab36aeae9cf526ad8067f58734;hp=15832804c130e0ffebe249d7926ab3d84a9a500e;hb=66f552e63fb7568c6cd30e3c3c0b2735acadc418;hpb=5406967fae63d57acb2d82f5d15a591b5b827af5 diff --git a/gps303/__main__.py b/gps303/__main__.py index 1583280..2ad2ecf 100644 --- a/gps303/__main__.py +++ b/gps303/__main__.py @@ -1,10 +1,12 @@ """ Command line tool for sending requests to the terminal """ +from configparser import ConfigParser from datetime import datetime, timezone from getopt import getopt from logging import getLogger from sys import argv from time import time +from typing import List, Tuple import zmq from . import common @@ -14,9 +16,12 @@ from .zmsg import Bcast, Resp log = getLogger("gps303") -def main(conf, opts, args): - zctx = zmq.Context() - zpush = zctx.socket(zmq.PUSH) +def main( + conf: ConfigParser, opts: List[Tuple[str, str]], args: List[str] +) -> None: + # Is this https://github.com/zeromq/pyzmq/issues/1627 still not fixed?! + zctx = zmq.Context() # type: ignore + zpush = zctx.socket(zmq.PUSH) # type: ignore zpush.connect(conf.get("collector", "listenurl")) if len(args) < 2: