Handles non-english charset encoding for filesystem paths

This commit is contained in:
2018-12-14 15:27:20 -06:00
parent 7f2956e47a
commit 4b5d271ab4
7 changed files with 32 additions and 40 deletions

View File

@@ -7,5 +7,5 @@ log = logging.getLogger("fixes.fix_requests")
def fix():
log.debug("Applying fix for requests...")
os.environ["REQUESTS_CA_BUNDLE"] = paths.app_path("cacert.pem")
log.debug("Changed CA path to %s" % (paths.app_path("cacert.pem"),))
os.environ["REQUESTS_CA_BUNDLE"] = os.path.join(paths.app_path().decode(paths.fsencoding), "cacert.pem").encode(paths.fsencoding)
log.debug("Changed CA path to %s" % (os.environ["REQUESTS_CA_BUNDLE"].decode(paths.fsencoding)))