summaryrefslogtreecommitdiff
path: root/sleekxmpp/util
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-10-24 01:23:08 -0700
committerLance Stout <lancestout@gmail.com>2012-10-24 01:23:08 -0700
commit931d49560a1ebf3b767d20f8aeb692dd30a518c3 (patch)
tree8584d849a450aabaac5cebd08245f2d6a47e6c0c /sleekxmpp/util
parent3655827ef2e268e9ab327e4a6c788c3e336146e0 (diff)
parent2a4e4352282e393e2843bc8d4c5847d7351ef34c (diff)
downloadslixmpp-931d49560a1ebf3b767d20f8aeb692dd30a518c3.tar.gz
slixmpp-931d49560a1ebf3b767d20f8aeb692dd30a518c3.tar.bz2
slixmpp-931d49560a1ebf3b767d20f8aeb692dd30a518c3.tar.xz
slixmpp-931d49560a1ebf3b767d20f8aeb692dd30a518c3.zip
Merge branch 'master' into develop
Diffstat (limited to 'sleekxmpp/util')
-rw-r--r--sleekxmpp/util/__init__.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/sleekxmpp/util/__init__.py b/sleekxmpp/util/__init__.py
index 7637dda0..1e4af02d 100644
--- a/sleekxmpp/util/__init__.py
+++ b/sleekxmpp/util/__init__.py
@@ -17,11 +17,15 @@ from sleekxmpp.util.misc_ops import bytes, unicode, hashes, hash, \
# =====================================================================
# Standardize import of Queue class:
-try:
- import queue
-except ImportError:
- import Queue as queue
+import sys
+if 'gevent' in sys.modules:
+ import gevent.queue as queue
+ Queue = queue.JoinableQueue
+else:
+ try:
+ import queue
+ except ImportError:
+ import Queue as queue
+ Queue = queue.Queue
-
-Queue = queue.Queue
QueueEmpty = queue.Empty