]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
swap platform.system() for sys.platform; #1263 1264/head
authorNick Bargnesi <nbargnesi@selventa.com>
Fri, 5 Dec 2014 06:37:45 +0000 (01:37 -0500)
committerNick Bargnesi <nbargnesi@selventa.com>
Fri, 5 Dec 2014 06:37:45 +0000 (01:37 -0500)
tornado/netutil.py

index f147c974d69d1a7dc8679a92d785790494c0eb87..e85f62b786902605a5fe5176e421a8f94b9db455 100644 (file)
@@ -20,7 +20,7 @@ from __future__ import absolute_import, division, print_function, with_statement
 
 import errno
 import os
-import platform
+import sys
 import socket
 import stat
 
@@ -105,7 +105,7 @@ def bind_sockets(port, address=None, family=socket.AF_UNSPEC,
     for res in set(socket.getaddrinfo(address, port, family, socket.SOCK_STREAM,
                                       0, flags)):
         af, socktype, proto, canonname, sockaddr = res
-        if (platform.system() == 'Darwin' and address == 'localhost' and
+        if (sys.platform == 'darwin' and address == 'localhost' and
                 af == socket.AF_INET6 and sockaddr[3] != 0):
             # Mac OS X includes a link-local address fe80::1%lo0 in the
             # getaddrinfo results for 'localhost'.  However, the firewall