From e3a66f35e7850bfbf507b0f50dcd6d365dc0afe4 Mon Sep 17 00:00:00 2001 From: Eugene Crosser Date: Tue, 26 Apr 2022 20:34:49 +0200 Subject: [PATCH 1/1] Remove deprecated functions --- gps303.conf | 4 ++-- gps303/common.py | 1 + gps303/gps303proto.py | 13 ------------- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/gps303.conf b/gps303.conf index bb7b6c7..7669381 100644 --- a/gps303.conf +++ b/gps303.conf @@ -4,10 +4,10 @@ publishurl = ipc:///tmp/collected listenurl = ipc:///tmp/responses [storage] -dbfn = gps303.sqlite +dbfn = /home/crosser/src/gps303/gps303.sqlite [opencellid] -dbfn = opencellid.sqlite +dbfn = /home/crosser/src/gps303/opencellid.sqlite [termconfig] statusIntervalMinutes = 25 diff --git a/gps303/common.py b/gps303/common.py index 6e4a2f3..09fb01f 100644 --- a/gps303/common.py +++ b/gps303/common.py @@ -3,6 +3,7 @@ from configparser import ConfigParser from getopt import getopt from logging import getLogger, StreamHandler, DEBUG, INFO +from logging.handlers import SysLogHandler from sys import argv, stderr, stdout CONF = "/etc/gps303.conf" diff --git a/gps303/gps303proto.py b/gps303/gps303proto.py index dcc335b..b0259a4 100755 --- a/gps303/gps303proto.py +++ b/gps303/gps303proto.py @@ -22,10 +22,8 @@ from struct import pack, unpack __all__ = ( "class_by_prefix", - "handle_packet", "inline_response", "make_object", - "make_response", "parse_message", "proto_by_name", "Dir", @@ -616,14 +614,3 @@ def parse_message(packet): adjust, ) return make_object(length, proto, payload) - - -def handle_packet(packet): # DEPRECATED - if len(packet) < 6 or packet[:2] != b"xx" or packet[-2:] != b"\r\n": - return UNKNOWN.from_packet(len(packet), packet) - return parse_message(packet[2:-2]) - - -def make_response(msg, **kwargs): # DEPRECATED - inframe = msg.response(**kwargs) - return None if inframe is None else b"xx" + inframe + b"\r\n" -- 2.43.0