i lost who sent this to me (sorry). patches to fix AIX.

This commit is contained in:
Robey Pointer 2010-04-25 13:34:54 -07:00
parent f67cea44d0
commit 3242df7f09
2 changed files with 7 additions and 6 deletions

View File

@ -281,7 +281,8 @@ class SSHClient (object):
addr = sockaddr
break
else:
raise SSHException('No suitable address family for %s' % hostname)
# some OS like AIX don't indicate SOCK_STREAM support, so just guess. :(
af, _, _, _, addr = socket.getaddrinfo(hostname, port, socket.AF_UNSPEC, socket.SOCK_STREAM)
sock = socket.socket(af, socket.SOCK_STREAM)
if timeout is not None:
try:

View File

@ -200,7 +200,7 @@ class SFTPAttributes (object):
else:
ks = '?---------'
# compute display date
if (self.st_mtime is None) or (self.st_mtime == 0xffffffff):
if (self.st_mtime is None) or (self.st_mtime == 0xffffffffL):
# shouldn't really happen
datestr = '(unknown date)'
else: