From f6bd52a3edde3faf43486589024ce4c4ae5112ba Mon Sep 17 00:00:00 2001 From: Danimar Ribeiro Date: Mon, 31 Jul 2017 13:43:20 -0300 Subject: [PATCH 1/2] Desabilitando warnings de SSL - Servidor da receita utiliza self-signed certificado --- pytrustnfe/client.py | 3 +++ setup.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pytrustnfe/client.py b/pytrustnfe/client.py index 595d38e..0facb2a 100644 --- a/pytrustnfe/client.py +++ b/pytrustnfe/client.py @@ -2,9 +2,11 @@ # © 2016 Danimar Ribeiro, Trustcode # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +import urllib3 import requests import suds.client import suds_requests +from requests.packages.urllib3.exceptions import InsecureRequestWarning def get_authenticated_client(base_url, cert, key): @@ -48,6 +50,7 @@ class HttpClient(object): def post_soap(self, xml_soap, cabecalho): header = self._headers(cabecalho.soap_action) + urllib3.disable_warnings(category=InsecureRequestWarning) res = requests.post(self.url, data=xml_soap, cert=(self.cert_path, self.key_path), verify=False, headers=header) diff --git a/setup.py b/setup.py index cc0d25e..2582254 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ # coding=utf-8 from setuptools import setup, find_packages -VERSION = "0.1.35" +VERSION = "0.1.36" setup( name="PyTrustNFe", From 094f3cc30c400881a74e63c6bc851c01dab72b8a Mon Sep 17 00:00:00 2001 From: Danimar Ribeiro Date: Mon, 31 Jul 2017 15:23:22 -0300 Subject: [PATCH 2/2] =?UTF-8?q?Nova=20vers=C3=A3o=20apenas=20para=20public?= =?UTF-8?q?a=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 2582254..6dfec1d 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ # coding=utf-8 from setuptools import setup, find_packages -VERSION = "0.1.36" +VERSION = "0.1.37" setup( name="PyTrustNFe",