Browse Source

corrigido ComunicacaoSefaz para SP

pull/3/head
Andre Kablukow 10 years ago
parent
commit
99dd4ae7c1
  1. 6
      pynfe/processamento/comunicacao.py

6
pynfe/processamento/comunicacao.py

@ -50,7 +50,11 @@ class ComunicacaoSefaz(Comunicacao):
if indSinc == 1:
# Procuta status no xml
ns = {'ns':'http://www.portalfiscal.inf.br/nfe'} # namespace
prot = etree.fromstring(retorno.text)
try:
prot = etree.fromstring(retorno.text)
except ValueError:
#em SP retorno.text apresenta erro
prot = etree.fromstring(retorno.content)
try:
# Protocolo com envio OK
infProt = prot[1][0][0][6] # root protNFe

Loading…
Cancel
Save