Skip to content

Commit

Permalink
Fix CacheControl import. (#357)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Sully authored and jsirois committed Jan 31, 2017
1 parent d70f2c4 commit 7ebd8bd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pex/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
try:
from cachecontrol import CacheControl
from cachecontrol.caches import FileCache

# Newer versions of CacheControl move the importing of `lockfile` to
# class instansiation, and raise an ImportError in the __init__ method.
#
# https://github.com/ionrock/cachecontrol/commit/a561ac9c1ef15db9bc6ead5d08443e6198cc69e1
FileCache(directory=None) # noqa
except ImportError:
CacheControl = FileCache = None

Expand Down

0 comments on commit 7ebd8bd

Please sign in to comment.