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 1cb5625
Showing 1 changed file with 3 additions and 3 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

0 comments on commit 1cb5625

Please sign in to comment.