Skip to content

Commit b459df8

Browse files
committed
Retorna manifesto ok caso status 103 ou 105
1 parent 7a8509e commit b459df8

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

pynfe/processamento/comunicacao.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,10 @@ def autorizacao(self, manifesto, id_lote=1, ind_sinc=1):
842842
rec = prot[1][0]
843843
status = rec.xpath("ns:retEnviMDFe/ns:cStat", namespaces=ns)[0].text
844844
# Lote Recebido com Sucesso!
845-
if status == self._edoc_situacao_arquivo_recebido_com_sucesso:
845+
if status in (
846+
self._edoc_situacao_arquivo_recebido_com_sucesso,
847+
self._edoc_situacao_em_processamento
848+
):
846849
nrec = rec.xpath("ns:retEnviMDFe/ns:infRec/ns:nRec", namespaces=ns)[0].text
847850
return 0, nrec, manifesto
848851
return 1, retorno, manifesto
@@ -1184,9 +1187,6 @@ def _post(self, url, xml):
11841187
)
11851188
xml = xml_declaration + xml
11861189

1187-
print(xml)
1188-
print('-' * 20)
1189-
11901190
# Faz o request com o servidor
11911191
result = requests.post(url, xml, headers=self._post_header(), cert=chave_cert, verify=False, timeout=300)
11921192
result.encoding = 'utf-8'

0 commit comments

Comments
 (0)