Skip to content

Commit 14e6184

Browse files
committed
Compose 1.14.0 hack
Signed-off-by: Joffrey F <[email protected]>
1 parent 65e01f2 commit 14e6184

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docker/utils/ports.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ def port_range(start, end, proto, randomly_available_port=False):
5454

5555

5656
def split_port(port):
57+
if hasattr(port, 'legacy_repr'):
58+
# This is the worst hack, but it prevents a bug in Compose 1.14.0
59+
# https://github.com/docker/docker-py/issues/1668
60+
# TODO: remove once fixed in Compose stable
61+
port = port.legacy_repr()
5762
port = str(port)
5863
match = PORT_SPEC.match(port)
5964
if match is None:

0 commit comments

Comments
 (0)