Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Clean up import style for gevent Semaphore

  • Loading branch information...
commit c50ee133bf765d79ba10e55c8e4cbdbb0f75a851 1 parent 0f61991
@dcramer dcramer authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 raven/transport/base.py
View
8 raven/transport/base.py
@@ -15,9 +15,9 @@
import gevent
# gevent 1.0bN renamed coros to lock
try:
- import gevent.lock as gevent_lock
- except:
- import gevent.coros as gevent_lock
+ from gevent.lock import Semaphore
+ except ImportError:
+ from gevent.coros import Semaphore
has_gevent = True
except:
has_gevent = None
@@ -181,7 +181,7 @@ class GeventedHTTPTransport(HTTPTransport):
def __init__(self, parsed_url, maximum_outstanding_requests=100):
if not has_gevent:
raise ImportError('GeventedHTTPTransport requires gevent.')
- self._lock = gevent_lock.Semaphore(maximum_outstanding_requests)
+ self._lock = Semaphore(maximum_outstanding_requests)
super(GeventedHTTPTransport, self).__init__(parsed_url)
Please sign in to comment.
Something went wrong with that request. Please try again.