Removed old fixes no longer needed
This commit is contained in:
parent
c90ff6a467
commit
1aa34ba4fa
@ -1,14 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
import sys
|
|
||||||
from . import fix_requests
|
|
||||||
|
|
||||||
#if hasattr(sys, "frozen"):
|
|
||||||
from . import fix_win32com
|
|
||||||
from . import fix_libloader
|
|
||||||
|
|
||||||
def setup():
|
|
||||||
fix_requests.fix()
|
|
||||||
# if hasattr(sys, "frozen"):
|
|
||||||
fix_libloader.fix()
|
|
||||||
fix_win32com.fix()
|
|
@ -1,36 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
import win32com
|
|
||||||
import paths
|
|
||||||
win32com.__build_path__=paths.com_path()
|
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
sys.path.append(os.path.join(win32com.__gen_path__, "."))
|
|
||||||
from win32com.client import gencache
|
|
||||||
from pywintypes import com_error
|
|
||||||
from libloader import com
|
|
||||||
|
|
||||||
fixed=False
|
|
||||||
|
|
||||||
def patched_getmodule(modname):
|
|
||||||
mod=__import__(modname)
|
|
||||||
return sys.modules[modname]
|
|
||||||
|
|
||||||
def load_com(*names):
|
|
||||||
global fixed
|
|
||||||
if fixed==False:
|
|
||||||
gencache._GetModule=patched_getmodule
|
|
||||||
com.prepare_gencache()
|
|
||||||
fixed=True
|
|
||||||
result = None
|
|
||||||
for name in names:
|
|
||||||
try:
|
|
||||||
result = gencache.EnsureDispatch(name)
|
|
||||||
break
|
|
||||||
except com_error:
|
|
||||||
continue
|
|
||||||
if result is None:
|
|
||||||
raise com_error("Unable to load any of the provided com objects.")
|
|
||||||
return result
|
|
||||||
|
|
||||||
def fix():
|
|
||||||
com.load_com = load_com
|
|
@ -1,12 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
import requests
|
|
||||||
import paths
|
|
||||||
import os
|
|
||||||
import logging
|
|
||||||
log = logging.getLogger("fixes.fix_requests")
|
|
||||||
|
|
||||||
def fix():
|
|
||||||
log.debug("Applying fix for requests...")
|
|
||||||
os.environ["REQUESTS_CA_BUNDLE"] = os.path.join(paths.app_path(), "cacert.pem")#.encode(paths.fsencoding)
|
|
||||||
# log.debug("Changed CA path to %s" % (os.environ["REQUESTS_CA_BUNDLE"]))#.decode(paths.fsencoding)))
|
|
@ -1,6 +0,0 @@
|
|||||||
from __future__ import unicode_literals
|
|
||||||
import win32com.client
|
|
||||||
def fix():
|
|
||||||
if win32com.client.gencache.is_readonly == True:
|
|
||||||
win32com.client.gencache.is_readonly = False
|
|
||||||
win32com.client.gencache.Rebuild()
|
|
Loading…
Reference in New Issue
Block a user