We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
docker port
1 parent 937a003 commit d8dd99bCopy full SHA for d8dd99b
tests/testlib.py
@@ -423,7 +423,10 @@ class DockerizedSshDaemon(object):
423
def _get_container_port(self):
424
s = subprocess__check_output(['docker', 'port', self.container_name])
425
for line in s.decode().splitlines():
426
- dport, proto, baddr, bport = self.PORT_RE.match(line).groups()
+ m = self.PORT_RE.match(line)
427
+ if not m:
428
+ continue
429
+ dport, proto, _, bport = m.groups()
430
if dport == '22' and proto == 'tcp':
431
self.port = int(bport)
432
0 commit comments