diff options
author | SVN-Git Migration <python-modules-team@lists.alioth.debian.org> | 2015-10-08 13:41:31 -0700 |
---|---|---|
committer | SVN-Git Migration <python-modules-team@lists.alioth.debian.org> | 2015-10-08 13:41:31 -0700 |
commit | ca5cb993a3ce4fbdf50eebd31cb6b71eec9bc391 (patch) | |
tree | 0cb1e57a7e04660775dc9426c1e4476082f88d1d /requests/packages/urllib3/_collections.py | |
parent | 224200a9815f792f93632d03a38e4f0763ae69ef (diff) | |
download | python-requests-ca5cb993a3ce4fbdf50eebd31cb6b71eec9bc391.tar python-requests-ca5cb993a3ce4fbdf50eebd31cb6b71eec9bc391.tar.gz |
Imported Upstream version 2.2.1
Diffstat (limited to 'requests/packages/urllib3/_collections.py')
-rw-r--r-- | requests/packages/urllib3/_collections.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/requests/packages/urllib3/_collections.py b/requests/packages/urllib3/_collections.py index 282b8d5..5907b0d 100644 --- 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 |