mirror of
https://github.com/ansible/awx.git
synced 2026-02-01 01:28:09 -03:30
fix the make rdb debugging tool
This commit is contained in:
@@ -155,9 +155,14 @@ class CustomPdb(Rdb):
|
||||
return Rdb.displayhook(self, obj)
|
||||
|
||||
def get_avail_port(self, *args, **kwargs):
|
||||
try:
|
||||
socket.gethostbyname('docker.for.mac.localhost')
|
||||
host = 'docker.for.mac.localhost'
|
||||
except:
|
||||
host = os.popen('ip route').read().split(' ')[2]
|
||||
sock, port = Rdb.get_avail_port(self, *args, **kwargs)
|
||||
socket.socket(socket.AF_INET, socket.SOCK_DGRAM).sendto(
|
||||
str(port), ('dockerhost', 6899)
|
||||
str(port), (host, 6899)
|
||||
)
|
||||
return (sock, port)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user