Author: georg.brandl
Date: Sun Jan  6 19:23:30 2008
New Revision: 59790

Modified:
   python/branches/py3k/Lib/asyncore.py
Log:
Fix exception slicing.


Modified: python/branches/py3k/Lib/asyncore.py
==============================================================================
--- python/branches/py3k/Lib/asyncore.py        (original)
+++ python/branches/py3k/Lib/asyncore.py        Sun Jan  6 19:23:30 2008
@@ -321,7 +321,7 @@
             conn, addr = self.socket.accept()
             return conn, addr
         except socket.error as why:
-            if why[0] == EWOULDBLOCK:
+            if why.args[0] == EWOULDBLOCK:
                 pass
             else:
                 raise
@@ -331,7 +331,7 @@
             result = self.socket.send(data)
             return result
         except socket.error as why:
-            if why[0] == EWOULDBLOCK:
+            if why.args[0] == EWOULDBLOCK:
                 return 0
             else:
                 raise
@@ -349,7 +349,7 @@
                 return data
         except socket.error as why:
             # winsock sometimes throws ENOTCONN
-            if why[0] in [ECONNRESET, ENOTCONN, ESHUTDOWN]:
+            if why.args[0] in [ECONNRESET, ENOTCONN, ESHUTDOWN]:
                 self.handle_close()
                 return b''
             else:
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to