diff options
author | Mickaël Schoentgen <contact@tiger-222.fr> | 2018-12-20 14:47:28 +0100 |
---|---|---|
committer | Mickaël Schoentgen <contact@tiger-222.fr> | 2018-12-20 14:54:52 +0100 |
commit | e99ce1e3593c64e6a6cae08a0af99ccb05a005e7 (patch) | |
tree | e55e89874031ac9b2a8f7758de240cf6355aecdf | |
parent | 7911c5463557acce7f0def1d9572742ef04a98f5 (diff) | |
download | docker-py-e99ce1e3593c64e6a6cae08a0af99ccb05a005e7.tar.gz |
Fix DeprecationWarning: invalid escape sequence in ports.py
Signed-off-by: Mickaël Schoentgen <contact@tiger-222.fr>
-rw-r--r-- | docker/utils/ports.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docker/utils/ports.py b/docker/utils/ports.py index bf7d697..cf5987c 100644 --- a/docker/utils/ports.py +++ b/docker/utils/ports.py @@ -3,10 +3,10 @@ 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 + r"(?P<int>[\d]+)(-(?P<int_end>[\d]+))?" # Internal range "(?P<proto>/(udp|tcp))?" # Protocol "$" # Match full string ) |