]> www.average.org Git - loctrkd.git/blobdiff - loctrkd/zx303proto.py
Revive command sender and implement some commands
[loctrkd.git] / loctrkd / zx303proto.py
index a2132f6c3c658aee30995d5326cf4d8701f93ba3..8c21418cd7a13c9af9f03c57d9d345f8c5592a50 100755 (executable)
@@ -864,6 +864,10 @@ if True:  # just to indent the code, sorry!
 def class_by_prefix(
     prefix: str,
 ) -> Union[Type[GPS303Pkt], List[Tuple[str, int]]]:
+    if prefix.startswith(PROTO_PREFIX):
+        pname = prefix[len(PROTO_PREFIX) :]
+    else:
+        raise KeyError(pname)
     lst = [
         (name, proto)
         for name, proto in PROTOS.items()