Skip to content

Commit

Permalink
Merge pull request #252 from dhapati2/fix_attributeError/issue_250
Browse files Browse the repository at this point in the history
Fixed issue for AttributeError: 'TLSConnection' object has no attribu…
  • Loading branch information
t-raghu authored Jun 12, 2024
2 parents 6ffa146 + e670f68 commit 317e07a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ucsmsdk/ucsdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def connect(self):
ssl_context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
ssl_context.options |= ssl.OP_NO_SSLv2
ssl_context.options |= ssl.OP_NO_SSLv3
if self.key_file and self.cert_file:
if getattr(self, "key_file", None) and getattr(self, "cert_file", None):
ssl_context.load_cert_chain(keyfile=self.key_file,
certfile=self.cert_file)
self.sock = ssl_context.wrap_socket(sock)
Expand Down

0 comments on commit 317e07a

Please sign in to comment.