Skip to content

Commit e99ce1e

Browse files
committed
Fix DeprecationWarning: invalid escape sequence in ports.py
Signed-off-by: Mickaël Schoentgen <[email protected]>
1 parent 7911c54 commit e99ce1e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docker/utils/ports.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
PORT_SPEC = re.compile(
44
"^" # Match full string
55
"(" # External part
6-
"((?P<host>[a-fA-F\d.:]+):)?" # Address
7-
"(?P<ext>[\d]*)(-(?P<ext_end>[\d]+))?:" # External range
6+
r"((?P<host>[a-fA-F\d.:]+):)?" # Address
7+
r"(?P<ext>[\d]*)(-(?P<ext_end>[\d]+))?:" # External range
88
")?"
9-
"(?P<int>[\d]+)(-(?P<int_end>[\d]+))?" # Internal range
9+
r"(?P<int>[\d]+)(-(?P<int_end>[\d]+))?" # Internal range
1010
"(?P<proto>/(udp|tcp))?" # Protocol
1111
"$" # Match full string
1212
)

0 commit comments

Comments
 (0)