qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eal...@apache.org
Subject svn commit: r1700852 - in /qpid/trunk/qpid/python/qpid: compat.py selector.py
Date Wed, 02 Sep 2015 16:58:29 GMT
Author: eallen
Date: Wed Sep  2 16:58:28 2015
New Revision: 1700852

URL: http://svn.apache.org/r1700852
Log:
NO-JIRA: Fix for python client ValueError exception. see bz1249608

Modified:
    qpid/trunk/qpid/python/qpid/compat.py
    qpid/trunk/qpid/python/qpid/selector.py

Modified: qpid/trunk/qpid/python/qpid/compat.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/compat.py?rev=1700852&r1=1700851&r2=1700852&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/compat.py (original)
+++ qpid/trunk/qpid/python/qpid/compat.py Wed Sep  2 16:58:28 2015
@@ -105,6 +105,7 @@ if hasattr(_select_mod, "poll") and not
     return (rfds, wfds, xfds)
 else:
   if tuple(sys.version_info[0:2]) < (2, 4):
+    from select import error as SelectError
     from select import select as old_select
     def select(rlist, wlist, xlist, timeout=None):
       return old_select(list(rlist), list(wlist), list(xlist), timeout)

Modified: qpid/trunk/qpid/python/qpid/selector.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/selector.py?rev=1700852&r1=1700851&r2=1700852&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/selector.py (original)
+++ qpid/trunk/qpid/python/qpid/selector.py Wed Sep  2 16:58:28 2015
@@ -17,7 +17,7 @@
 # under the License.
 #
 import atexit, time, errno, os
-from compat import select, set, selectable_waiter
+from compat import select, SelectError, set, selectable_waiter
 from threading import Thread, Lock
 
 class Acceptor:
@@ -125,9 +125,9 @@ class Selector:
             timeout = max(0, wakeup - time.time())
           rd, wr, ex = select(self.reading, self.writing, (), timeout)
           break
-        except Exception, (err, strerror):
+        except SelectError, e:
           # Repeat the select call if we were interrupted.
-          if err == errno.EINTR:
+          if e[0] == errno.EINTR:
             continue
           else:
             raise



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message