]> granicus.if.org Git - python/commitdiff
rename DISCONNECTED global constant in _DISCONNECTED
authorGiampaolo Rodolà <g.rodola@gmail.com>
Wed, 15 Sep 2010 21:59:04 +0000 (21:59 +0000)
committerGiampaolo Rodolà <g.rodola@gmail.com>
Wed, 15 Sep 2010 21:59:04 +0000 (21:59 +0000)
Lib/asyncore.py

index fbbee29bc3b6da5e3dd4b2ee3c41db1067dc6d94..8745276a80d800cd800689fcf6d3051f08914b23 100644 (file)
@@ -56,7 +56,7 @@ import os
 from errno import EALREADY, EINPROGRESS, EWOULDBLOCK, ECONNRESET, EINVAL, \
      ENOTCONN, ESHUTDOWN, EINTR, EISCONN, EBADF, ECONNABORTED, errorcode
 
-DISCONNECTED = frozenset((ECONNRESET, ENOTCONN, ESHUTDOWN, ECONNABORTED))
+_DISCONNECTED = frozenset((ECONNRESET, ENOTCONN, ESHUTDOWN, ECONNABORTED))
 
 try:
     socket_map
@@ -366,7 +366,7 @@ class dispatcher:
         except socket.error as why:
             if why.args[0] == EWOULDBLOCK:
                 return 0
-            elif why.args[0] in DISCONNECTED:
+            elif why.args[0] in _DISCONNECTED:
                 self.handle_close()
                 return 0
             else:
@@ -384,7 +384,7 @@ class dispatcher:
                 return data
         except socket.error as why:
             # winsock sometimes throws ENOTCONN
-            if why.args[0] in DISCONNECTED:
+            if why.args[0] in _DISCONNECTED:
                 self.handle_close()
                 return b''
             else: