From 7d4f9079c8b14e4dd9cd1519014eb1e779a68248 Mon Sep 17 00:00:00 2001 From: pal0schi <31492998+pal0schi@users.noreply.github.com> Date: Fri, 5 Jan 2018 11:22:42 -0200 Subject: [PATCH] =?UTF-8?q?*=20corre=C3=A7=C3=A3o=20da=20url=20de=20campo?= =?UTF-8?q?=20grande-ms?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pytrustnfe/nfse/dsf/__init__.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pytrustnfe/nfse/dsf/__init__.py b/pytrustnfe/nfse/dsf/__init__.py index 60273d0..df4ce4a 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,6 +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( @@ -80,8 +81,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,