]> www.average.org Git - loctrkd.git/blobdiff - gps303/common.py
introduce `class_by_prefix()`
[loctrkd.git] / gps303 / common.py
index 44c301d41c591bbd785ef5b077d09a9ac8f338e3..6e4a2f36209f05a37198a0735c4a8cd0a323c3cd 100644 (file)
@@ -10,8 +10,9 @@ PORT = 4303
 DBFN = "/var/lib/gps303/gps303.sqlite"
 
 
-def init(log):
-    opts, _ = getopt(argv[1:], "c:d")
+def init(log, opts=None):
+    if opts is None:
+        opts, _ = getopt(argv[1:], "c:d")
     opts = dict(opts)
     conf = readconfig(opts["-c"] if "-c" in opts else CONF)
     if stdout.isatty():