diff options
Diffstat (limited to 'docker/utils/ports.py')
-rw-r--r-- | docker/utils/ports.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docker/utils/ports.py b/docker/utils/ports.py index bf7d697..a50cc02 100644 --- a/docker/utils/ports.py +++ b/docker/utils/ports.py @@ -3,11 +3,11 @@ import re PORT_SPEC = re.compile( "^" # Match full string "(" # External part - "((?P<host>[a-fA-F\d.:]+):)?" # Address - "(?P<ext>[\d]*)(-(?P<ext_end>[\d]+))?:" # External range + r"((?P<host>[a-fA-F\d.:]+):)?" # Address + r"(?P<ext>[\d]*)(-(?P<ext_end>[\d]+))?:" # External range ")?" - "(?P<int>[\d]+)(-(?P<int_end>[\d]+))?" # Internal range - "(?P<proto>/(udp|tcp))?" # Protocol + r"(?P<int>[\d]+)(-(?P<int_end>[\d]+))?" # Internal range + "(?P<proto>/(udp|tcp|sctp))?" # Protocol "$" # Match full string ) |