From e99ce1e3593c64e6a6cae08a0af99ccb05a005e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Schoentgen?= Date: Thu, 20 Dec 2018 14:47:28 +0100 Subject: [PATCH] Fix DeprecationWarning: invalid escape sequence in ports.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mickaƫl Schoentgen --- docker/utils/ports.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/utils/ports.py b/docker/utils/ports.py index bf7d6972..cf5987c9 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[a-fA-F\d.:]+):)?" # Address - "(?P[\d]*)(-(?P[\d]+))?:" # External range + r"((?P[a-fA-F\d.:]+):)?" # Address + r"(?P[\d]*)(-(?P[\d]+))?:" # External range ")?" - "(?P[\d]+)(-(?P[\d]+))?" # Internal range + r"(?P[\d]+)(-(?P[\d]+))?" # Internal range "(?P/(udp|tcp))?" # Protocol "$" # Match full string )