mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
Fixing requests.urllib3 warnings
This commit is contained in:
parent
0c60377082
commit
5467655264
@ -5,7 +5,7 @@ if snapshot == False:
|
||||
version = "0.80"
|
||||
update_url = 'http://twblue.es/updates/twblue_ngen.json'
|
||||
else:
|
||||
version = "9.4"
|
||||
version = "9.5"
|
||||
update_url = 'http://twblue.es/updates/snapshots_ngen.json'
|
||||
author = u"Manuel Cortéz, Bill Dengler"
|
||||
authorEmail = "manuel@manuelcortez.net"
|
||||
|
@ -47,8 +47,8 @@ class bufferController(object):
|
||||
|
||||
|
||||
def get_event(self, ev):
|
||||
if ev.GetKeyCode() == wx.WXK_RETURN and ev.ControlDown(): event = "url"
|
||||
elif ev.GetKeyCode() == wx.WXK_RETURN: event = "interact"
|
||||
if ev.GetKeyCode() == wx.WXK_RETURN and ev.ControlDown(): event = "interact"
|
||||
elif ev.GetKeyCode() == wx.WXK_RETURN: event = "url"
|
||||
elif ev.GetKeyCode() == wx.WXK_F5: event = "volume_down"
|
||||
elif ev.GetKeyCode() == wx.WXK_F6: event = "volume_up"
|
||||
elif ev.GetKeyCode() == wx.WXK_DELETE and ev.ShiftDown(): event = "clear_list"
|
||||
|
@ -1,6 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
""" 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.
|
||||
|
||||
def setup():
|
||||
fix_arrow.fix()
|
||||
fix_arrow.fix()
|
||||
# if hasattr(sys, "frozen"):
|
||||
# fix_requests_cert_location.fix()
|
||||
fix_urllib3_warnings.fix()
|
9
src/fixes/fix_requests_cert_location.py
Normal file
9
src/fixes/fix_requests_cert_location.py
Normal file
@ -0,0 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import paths
|
||||
|
||||
def where():
|
||||
return paths.app_path(r"requests\cacert.pem")
|
||||
|
||||
def fix():
|
||||
from requests import certs
|
||||
certs.where = where
|
5
src/fixes/fix_urllib3_warnings.py
Normal file
5
src/fixes/fix_urllib3_warnings.py
Normal file
@ -0,0 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from requests.packages import urllib3
|
||||
|
||||
def fix():
|
||||
urllib3.disable_warnings()
|
@ -51,6 +51,7 @@ log = logging.getLogger("main")
|
||||
def setup():
|
||||
log.debug("Starting " + application.name + " %s" % (application.version,))
|
||||
config.setup()
|
||||
fixes.setup()
|
||||
log.debug("Using %s %s" % (platform.system(), platform.architecture()[0]))
|
||||
log.debug("Application path is %s" % (paths.app_path(),))
|
||||
log.debug("config path is %s" % (paths.config_path(),))
|
||||
@ -71,7 +72,6 @@ def setup():
|
||||
if hasattr(sm.view, "destroy"):
|
||||
sm.view.destroy()
|
||||
del sm
|
||||
fixes.setup()
|
||||
r = mainController.Controller()
|
||||
r.view.show()
|
||||
r.do_work()
|
||||
|
Loading…
Reference in New Issue
Block a user