From 51bd742ffd29eea9efcad0ede6a4d676e4280a57 Mon Sep 17 00:00:00 2001 From: Felipe Date: Tue, 2 Jan 2018 11:27:24 -0200 Subject: [PATCH] =?UTF-8?q?corre=C3=A7=C3=A3o=20da=20url=20de=20campo=20gr?= =?UTF-8?q?ande-ms?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pytrustnfe/nfse/dsf/__init__.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pytrustnfe/nfse/dsf/__init__.py b/pytrustnfe/nfse/dsf/__init__.py index 60273d0..c1e4c28 100644 --- a/pytrustnfe/nfse/dsf/__init__.py +++ b/pytrustnfe/nfse/dsf/__init__.py @@ -45,7 +45,7 @@ def _get_url(**kwargs): # São Luis - MA '0921': 'https://stm.semfaz.saoluis.ma.gov.br/WsNFe2/LoteRps?wsdl', # Campo Grande - MS - '2729': 'http://issdigital.pmcg.ms.gov.br/WsNFe2/LoteRps.jws', + '2729': 'http://issdigital.pmcg.ms.gov.br/WsNFe2/LoteRps.jws?wsdl', } try: @@ -62,7 +62,7 @@ def _send(certificado, method, **kwargs): xml_send = _render(path, method, **kwargs) client = get_client(url) - + response = False if certificado: cert, key = extract_cert_and_key_from_pfx( certificado.pfx, certificado.password) @@ -80,8 +80,10 @@ def _send(certificado, method, **kwargs): 'object': None } except Exception as e: - print (response) - print (e) + if response: + raise Exception(response) + else: + raise e return { 'sent_xml': xml_send,