Skip to content

Commit 0c4e7e4

Browse files
committed
Added extra protection against death in the event that we don't pass a string for host to get_socket or new_get_auth.
1 parent d76fdc5 commit 0c4e7e4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎Xlib/support/unix_connect.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def get_display(display):
7373
def get_socket(dname, host, dno):
7474
try:
7575
# Darwin funky socket
76-
if (uname[0] == 'Darwin') and host.startswith('/tmp/'):
76+
if (uname[0] == 'Darwin') and host and host.startswith('/tmp/'):
7777
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
7878
s.connect(dname)
7979

@@ -97,7 +97,7 @@ def get_socket(dname, host, dno):
9797

9898
def new_get_auth(sock, dname, host, dno):
9999
# Translate socket address into the xauth domain
100-
if (uname[0] == 'Darwin') and host.startswith('/tmp/'):
100+
if (uname[0] == 'Darwin') and host and host.startswith('/tmp/'):
101101
family = xauth.FamilyLocal
102102
addr = socket.gethostname()
103103

0 commit comments

Comments
 (0)