Skip to content

Commit

Permalink
fix(info): 🩹 default value for brand_raw (resolve #241)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnzhiZhang committed Nov 9, 2024
1 parent 04c6bb0 commit 4f7784c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/info/info/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def get_cpu_use():
return f'{average(*psutil.cpu_percent(percpu=True))}%'

def get_cpu_brand():
return cpuinfo.get_cpu_info()['brand_raw']
return cpuinfo.get_cpu_info().get('brand_raw', 'N/A')

def get_memory_use():
used = psutil.virtual_memory().used
Expand Down

0 comments on commit 4f7784c

Please sign in to comment.