Use the `noqa` comment on a handful of lines that flake8 detects as
issues. I don't want to invest a ton of time looking into if the
imports cause needed side-effects. I also don't want to debug if
the bare except is trying to catch exceptions that don't inherit
from Exception. So, make the file flake8 clean by just suppressing
these remaining things.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
import os
if 'UNITTEST' in os.environ:
- import tests
+ import tests # noqa
import bcrypt
import cephfs
fs_id = None
try:
fs_id = self.get_fs_id()
- except:
+ except: # noqa
# the filesystem does not exist now -- connection is not valid.
pass
logger.debug("self.fs_id={0}, fs_id={1}".format(self.fs_id, fs_id))
def get_cert_issuer_info(crt: str) -> Tuple[Optional[str], Optional[str]]:
"""Basic validation of a ca cert"""
- from OpenSSL import crypto, SSL
+ from OpenSSL import crypto, SSL # noqa
try:
crt_buffer = crt.encode("ascii") if isinstance(crt, str) else crt
(org_name, cn) = (None, None)