Skip to content

Commit

Permalink
Handle missing brand key (#512)
Browse files Browse the repository at this point in the history
* Handle missing brand key

On some machines the brand key may not be available, causing an unnecessary crash

* Simplify cpu info patch
  • Loading branch information
gkanwar authored and JarnoRFB committed Jul 22, 2019
1 parent 854bf59 commit db7e896
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sacred/host_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,4 @@ def _get_cpu_by_proc_cpuinfo():


def _get_cpu_by_pycpuinfo():
return cpuinfo.get_cpu_info()['brand']
return cpuinfo.get_cpu_info().get('brand', 'Unknown')

0 comments on commit db7e896

Please sign in to comment.