From 594cff431d26531d0c728b198e8dee01993be583 Mon Sep 17 00:00:00 2001 From: Miguel Caballer Date: Wed, 8 May 2024 08:32:53 +0200 Subject: [PATCH] Minor change --- changelog | 4 ++++ radl/__init__.py | 2 +- radl/radl.py | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/changelog b/changelog index 769bc9f..5d86f75 100644 --- a/changelog +++ b/changelog @@ -69,3 +69,7 @@ RADL 1.31 RADL 1.32 * Error parsing net_interface.0.additional_dns_names in json. + +RADL 1.33 + + * Minor internal code changes. diff --git a/radl/__init__.py b/radl/__init__.py index 0d6e88e..fc84d69 100644 --- a/radl/__init__.py +++ b/radl/__init__.py @@ -16,4 +16,4 @@ __all__ = ['radl_parse', 'radl_json', 'radl'] -__version__ = '1.3.2' +__version__ = '1.3.3' diff --git a/radl/radl.py b/radl/radl.py index c0282cd..c9b5a3c 100644 --- a/radl/radl.py +++ b/radl/radl.py @@ -1480,8 +1480,8 @@ def parseOutPorts(outports): res = [] ports = outports.split(',') for port in ports: - expr = ("^((\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}\/\d{1,2})-){0,1}((\d+)((:)\d+){0,1}((\/tcp|\/udp){0,1}))" - "((-)((\d+)((:)\d+){0,1}((\/tcp|\/udp){0,1}))){0,1}$") + expr = (r"^((\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}\/\d{1,2})-){0,1}((\d+)((:)\d+){0,1}((\/tcp|\/udp){0,1}))" + r"((-)((\d+)((:)\d+){0,1}((\/tcp|\/udp){0,1}))){0,1}$") match = re.search(expr, port) if not match: raise RADLParseException('Invalid outports format.')