locate ankiweb.certs within binary build

This commit is contained in:
Damien Elmes 2016-12-13 11:59:37 +10:00
parent 35a5d2ce5e
commit dbbaba67a6

View file

@ -47,7 +47,10 @@ def httpCon():
os.path.dirname(os.path.abspath(sys.argv[0])),
"../Resources/ankiweb.certs")
else:
assert 0, "Your distro has not packaged Anki correctly."
certs = os.path.abspath(os.path.join(
os.path.dirname(certs), "..", "ankiweb.certs"))
if not os.path.exists(certs):
assert 0, "Your distro has not packaged Anki correctly."
return httplib2.Http(
timeout=HTTP_TIMEOUT, ca_certs=certs,
proxy_info=HTTP_PROXY,