From 27c9ce902b8645a104a496ba16c63940dfceafb7 Mon Sep 17 00:00:00 2001 From: Flavyo Henrique Date: Mon, 4 Jan 2021 17:34:26 -0300 Subject: [PATCH] =?UTF-8?q?-=20Corre=C3=A7=C3=A3o=20no=20nome=20do=20m?= =?UTF-8?q?=C3=A9todo.=20-=20Atualiza=C3=A7=C3=A3o=20do=20README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + pytrustnfe/nfse/goiania/__init__.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e2a6e17..926353f 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ NFSe - Cidades atendidas * **Paulistana** - São Paulo/SP * **Nota Carioca** - Rio de Janeiro/RJ * **Imperial** - Petrópolis/RH +* **Goiânia** - Goiânia/GO * [Susesu](cidades/susesu.md) - 3 cidades atendidas * [Simpliss](cidades/simpliss.md) - 18 cidade atendidas * [GINFES](cidaes/ginfes.md) - 79 cidades atendidas diff --git a/pytrustnfe/nfse/goiania/__init__.py b/pytrustnfe/nfse/goiania/__init__.py index 726b548..832f1d9 100644 --- a/pytrustnfe/nfse/goiania/__init__.py +++ b/pytrustnfe/nfse/goiania/__init__.py @@ -49,12 +49,12 @@ def gerar_nfse(certificado, **kwargs): return _send(certificado, "GerarNfse", **kwargs) -def strip_result(xml_received: str): +def split_result(xml_received: str): """ Retorna o código e a mensagem de retorno vindo do webservice """ xml = etree.fromstring(xml_received) - if not xml: + if xml is None: return None, None ns = './/{http://nfse.goiania.go.gov.br/xsd/nfse_gyn_v02.xsd}' @@ -67,7 +67,7 @@ def strip_result(xml_received: str): def is_success(xml_received: str): """ Retorna se a emissão da NFS-e deu certo """ - code, _ = strip_result(xml_received) + code, _ = split_result(xml_received) # Code L000 significa que a nota foi aprovada return code == 'L000'