Fix flake8 blind except error by using more concrete types

Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
This commit is contained in:
Christophe Bedard 2021-01-11 13:17:25 -05:00
parent 3f796fa767
commit 58282c302f

View file

@ -113,6 +113,6 @@ def is_lttng_installed() -> bool:
if 0 != process.returncode:
raise RuntimeError(stderr.decode())
return True
except Exception as e:
except (RuntimeError, FileNotFoundError) as e:
print(f'LTTng not found: {e}\n{message_doc}', file=sys.stderr)
return False