Fix flake8 blind except error by using more concrete types
Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
This commit is contained in:
parent
3f796fa767
commit
58282c302f
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue