Skip to content

Commit

Permalink
systemtests python-bareos: prevent warnings
Browse files Browse the repository at this point in the history
When trying an unsuccessful authentication,
Python issues a warning message about an unclosed SSL socket.
This change hides these warnings.

It also contain a workaround to prevent a Deprecation Warning in Python > 3.2.
  • Loading branch information
joergsteffens committed Nov 30, 2020
1 parent 3686c1e commit cf9cce7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python-bareos/bareos/bsock/lowlevel.py
Expand Up @@ -295,7 +295,7 @@ def _init_connection(self):

def close(self):
"""disconnect"""
if self.socket:
if self.socket is not None:
self.socket.close()
self.socket = None

Expand Down

0 comments on commit cf9cce7

Please sign in to comment.