Added a fix for gencache on win32com

This commit is contained in:
Manuel Cortez 2015-06-26 17:52:49 -05:00
parent 70076aadb0
commit 33733eb2c4
3 changed files with 10 additions and 12 deletions

View File

@ -2,11 +2,11 @@
""" This module contains some bugfixes for packages used in TWBlue."""
import sys
import fix_arrow # A few new locales for Three languages in arrow.
# import fix_requests_cert_location # For a better compilation in Windows.
import fix_urllib3_warnings # Avoiding some SSL warnings related to Twython.
import fix_win32com
def setup():
fix_arrow.fix()
# if hasattr(sys, "frozen"):
# fix_requests_cert_location.fix()
if hasattr(sys, "frozen"):
fix_win32com.fix()
fix_urllib3_warnings.fix()

View File

@ -1,9 +0,0 @@
# -*- coding: utf-8 -*-
import paths
def where():
return paths.app_path(r"requests\cacert.pem")
def fix():
from requests import certs
certs.where = where

View File

@ -0,0 +1,7 @@
import win32com.client
def fix():
if win32com.client.gencache.is_readonly == True:
win32com.client.gencache.is_readonly = False
win32com.client.gencache.Rebuild()