1
0
mirror of https://github.com/HorlogeSkynet/archey4 synced 2025-04-11 12:00:19 +02:00

[CORE] Fixes two new Pylint errors related to uncaught exceptions issues

This commit is contained in:
Samuel FORESTIER 2022-04-06 19:41:35 +02:00
parent bd5bae154a
commit ee985814b8
2 changed files with 4 additions and 4 deletions

@ -173,11 +173,11 @@ def main():
# Has the screenshot flag been specified ?
if args.screenshot is not None:
# If so, but still _falsy_, pass `None` as no output file has been specified by the user.
screenshot_taken = False
try:
# If so, but still _falsy_, pass `None` as there is no user-defined output file.
screenshot_taken = take_screenshot((args.screenshot or None))
except KeyboardInterrupt:
screenshot_taken = False
print()
finally:
sys.exit((not screenshot_taken))

@ -75,7 +75,8 @@ class Temperature(Entry):
if whitelisted_chip is not None:
sensors_args.append(whitelisted_chip)
# Uses the `sensors` program (from lm-sensors) to interrogate thermal chip-sets.
# Uses the `sensors` program (from lm-sensors) to query thermal chipsets.
error_message = None
try:
sensors_output = run(
sensors_args,
@ -84,7 +85,6 @@ class Temperature(Entry):
check=True
)
except FileNotFoundError:
error_message = None
return None
except CalledProcessError as called_process_error:
error_message = called_process_error.stderr