From dbbaba67a607dcc63790d515af7188c6ca95f156 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 13 Dec 2016 11:59:37 +1000 Subject: [PATCH] locate ankiweb.certs within binary build --- anki/sync.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/anki/sync.py b/anki/sync.py index 711f1bd3c..7383a7326 100644 --- a/anki/sync.py +++ b/anki/sync.py @@ -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,