Allow running from anywhere

This commit is contained in:
Petr Mrázek 2016-02-20 17:29:56 +01:00
parent 34241bfb39
commit b4a16e09f1

View File

@ -11,6 +11,10 @@ from subprocess import Popen, PIPE
from cachecontrol.caches import FileCache
abspath = os.path.abspath(__file__)
dname = os.path.dirname(abspath)
os.chdir(dname)
forever_cache = FileCache('http_cache', forever=True)
sess = CacheControl(requests.Session(), forever_cache)