Skip to content

Commit

Permalink
Expand exception handling for NVML errors (#22)
Browse files Browse the repository at this point in the history
Extended the exception handling to catch any general exception along with `NVML_ERROR_NOT_SUPPORTED`.
  • Loading branch information
Lenochxd committed Jul 23, 2024
1 parent 2fd3595 commit f93ca52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/buttons/usage/get_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def get_usage(
computer_info["gpus"][f"GPU{count + 1}"] = {
"usage_percent": int(utilization.gpu),
}
except pynvml.nvml.NVML_ERROR_NOT_SUPPORTED:
except (pynvml.nvml.NVML_ERROR_NOT_SUPPORTED, Exception):
computer_info["gpus"]["defaultGPU"] = {}

config["settings"]["gpu_method"] = "None"
Expand Down

0 comments on commit f93ca52

Please sign in to comment.