From 3e1fdce4399973c4e08b57b739d03504f64a07d0 Mon Sep 17 00:00:00 2001 From: Bill Mitchell Date: Fri, 6 Apr 2018 04:50:18 -0500 Subject: [PATCH] Fixed dependency issues for remove_WIDEn_N --- aprslib/util/__init__.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/aprslib/util/__init__.py b/aprslib/util/__init__.py index 811a320..c821802 100644 --- a/aprslib/util/__init__.py +++ b/aprslib/util/__init__.py @@ -1,5 +1,13 @@ from math import floor +import re +__all__=["degrees_to_ddm", + "latitude_to_ddm", + "longitude_to_ddm", + "comment_altitude", + "floor", + "remove_WIDEn_N", + ] def degrees_to_ddm(dd): degrees = int(floor(dd)) @@ -40,6 +48,6 @@ def remove_WIDEn_N(path): path: path of parsed packet (list of strings) returns: list of digipeaters that digipeated packet, in order """ - path = map(lambda x: re.sub('*$', '', x), path) # Remove asterisks + path = map(lambda x: re.sub('\*$', '', x), path) # Remove asterisks path = list(filter(lambda x: not re.match(r'WIDE[0-9\-\*]+$', x), path)) return(path)