Skip to content

Commit

Permalink
Merge pull request #33 from MattiaSilvestri/warning
Browse files Browse the repository at this point in the history
handle error in finding cpu info #17
  • Loading branch information
FrnRmn authored May 13, 2024
2 parents 8d8b2dd + 65f7709 commit f613526
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utils/cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ def get_cpu_info() -> str:
:return: Info regarding CPU model installed
:rtype: str
"""

try:
cpu_info = cpuinfo.get_cpu_info()["brand_raw"]
except:
cpu_info= "CPU Info not available"

except Exception as e:
print("Error retrieving CPU info. Stopping execution.")
sys.exit(1)

return cpu_info


Expand Down

0 comments on commit f613526

Please sign in to comment.