X-Git-Url: http://www.average.org/gitweb/?a=blobdiff_plain;f=gps303%2F__main__.py;h=fcd07a6380ff43ec3c8d1060ebcfba57da443a99;hb=bf48ccad4b4b91e7d7e09d1087f5953bc2db97d7;hp=15832804c130e0ffebe249d7926ab3d84a9a500e;hpb=2cc29ee67b6432e1cd74a21b3c9181b8b5b557f9;p=loctrkd.git diff --git a/gps303/__main__.py b/gps303/__main__.py index 1583280..fcd07a6 100644 --- a/gps303/__main__.py +++ b/gps303/__main__.py @@ -1,22 +1,27 @@ """ 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 -from .gps303proto import * +from .zx303proto import * 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: