Fixing requests.urllib3 warnings

This commit is contained in:
2015-06-12 12:26:14 -05:00
parent 0c60377082
commit 5467655264
6 changed files with 25 additions and 5 deletions

View File

@@ -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()

View 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

View File

@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
from requests.packages import urllib3
def fix():
urllib3.disable_warnings()