Skip to content

Commit

Permalink
[FIX] connection class
Browse files Browse the repository at this point in the history
  • Loading branch information
renatonlima committed Aug 6, 2019
1 parent 16cc4ee commit 37961e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions pysped/nfe/processador_nfe.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@ def connect(self):
self.sock = sock
self._tunnel()

if sys.version_info >= (2,7,13):
self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file, ssl_version=ssl.PROTOCOL_TLS, do_handshake_on_connect=False)
else:
if sys.version_info.major == 2:
self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file, ssl_version=ssl.PROTOCOL_TLSv1_2, do_handshake_on_connect=False)
else:
self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file, ssl_version=ssl.PROTOCOL_TLS, do_handshake_on_connect=False)


class ProcessadorNFe(object):
Expand Down
6 changes: 3 additions & 3 deletions pysped/nfe/webservices_4.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

METODO_WS = {
WS_NFE_INUTILIZACAO: {
'webservice': 'NFeInutilizacao4',
'webservice': 'NfeInutilizacao4',
'metodo' : 'nfeInutilizacaoNF',
},
WS_NFE_CONSULTA: {
Expand All @@ -58,8 +58,8 @@
'metodo' : 'nfeStatusServicoNF',
},
WS_NFE_CONSULTA_CADASTRO: {
'webservice': 'CadConsultaCadastro4',
'metodo' : 'consultaCadastro2',
'webservice': 'NfeConsultaCadastro',
'metodo' : 'consultaCadastro',
},
WS_NFE_RECEPCAO_EVENTO: {
'webservice': 'NFeRecepcaoEvento4',
Expand Down

0 comments on commit 37961e8

Please sign in to comment.