diff options
author | Joerg Steffens <joerg.steffens@bareos.com> | 2020-11-13 20:14:59 +0300 |
---|---|---|
committer | Joerg Steffens <joerg.steffens@bareos.com> | 2020-11-23 21:31:26 +0300 |
commit | 6c5d6db9db6a53b645c256819ca9d3906599c75d (patch) | |
tree | ca252358e13531ca2b083eaf708dc4a75f8eaf6e /python-bareos | |
parent | f54ea4b8656fad18f08320de996f514de288c94b (diff) |
systemtests python-bareos: prevent warnings
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.
Diffstat (limited to 'python-bareos')
-rw-r--r-- | python-bareos/bareos/bsock/lowlevel.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python-bareos/bareos/bsock/lowlevel.py b/python-bareos/bareos/bsock/lowlevel.py index f1d85566c..8c08f36f4 100644 --- a/python-bareos/bareos/bsock/lowlevel.py +++ b/python-bareos/bareos/bsock/lowlevel.py @@ -314,7 +314,7 @@ class LowLevel(object): def close(self): """disconnect""" - if self.socket: + if self.socket is not None: self.socket.close() self.socket = None |