projects
/
platform
/
upstream
/
python-requests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
340b245
)
Update urllib3 to 929f1586
author
Donald Stufft
<donald@stufft.io>
Wed, 27 Nov 2013 02:41:15 +0000
(21:41 -0500)
committer
Donald Stufft
<donald@stufft.io>
Wed, 27 Nov 2013 02:41:15 +0000
(21:41 -0500)
requests/packages/urllib3/_collections.py
patch
|
blob
|
history
diff --git
a/requests/packages/urllib3/_collections.py
b/requests/packages/urllib3/_collections.py
index
282b8d5
..
5907b0d
100644
(file)
--- a/
requests/packages/urllib3/_collections.py
+++ b/
requests/packages/urllib3/_collections.py
@@
-5,7
+5,16
@@
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from collections import MutableMapping
-from threading import RLock
+try:
+ from threading import RLock
+except ImportError: # Platform-specific: No threads available
+ class RLock:
+ def __enter__(self):
+ pass
+
+ def __exit__(self, exc_type, exc_value, traceback):
+ pass
+
try: # Python 2.7+
from collections import OrderedDict