Commits

Marcin Lulek committed 297b6ed

fix import for gevent 1.0b2

Comments (0)

Files changed (1)

gevent_cometd/__init__.py

 import datetime
 import pkg_resources
 
+try:
+    from gevent.lock import Rlock
+except ImportError as e:
+    from gevent.coros import Rlock
+
 # not used yet - if ever
 #import redis
 #redis_conn = redis.Redis('127.0.0.1', 6379, 2)
          'total_unique_messages':0,
          'started_on':datetime.datetime.utcnow()}
 
-users_lock = gevent.coros.RLock()
-channels_lock = gevent.coros.RLock()
+users_lock = RLock()
+channels_lock = RLock()
 channels = {}
 users = {}
 connections = {}