File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
continuous_integration/scripts Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -30,11 +30,16 @@ def main() -> None:
3030 bench ()
3131 print (f"Crude CPU benchmark (higher is better): { bench ():.1f} " )
3232
33- freqs = psutil .cpu_freq (percpu = True )
34- print ("CPU frequency:" )
35- for freq in freqs :
36- # FIXME types-psutil
37- print (f" - current={ freq .current } , min={ freq .min } , max={ freq .max } " ) # type: ignore
33+ try :
34+ freqs = psutil .cpu_freq (percpu = True )
35+ # https://github.com/giampaolo/psutil/issues/2382
36+ except RuntimeError :
37+ print ("CPU frequency: not available" )
38+ else :
39+ print ("CPU frequency:" )
40+ for freq in freqs :
41+ # FIXME types-psutil
42+ print (f" - current={ freq .current } , min={ freq .min } , max={ freq .max } " ) # type: ignore
3843
3944 mem = psutil .virtual_memory ()
4045 print ("Memory:" )
You can’t perform that action at this time.
0 commit comments