mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-07-17 21:56:07 -04:00
Fixing requests.urllib3 warnings
This commit is contained in:
@@ -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()
|
Reference in New Issue
Block a user