Fix bad-whitespace errors found by pylint
This commit is contained in:
parent
7af57c7fc4
commit
57204a215e
23 changed files with 66 additions and 66 deletions
|
@ -46,14 +46,14 @@ class Module(bumblebee.engine.Module):
|
|||
log.debug("retrieved temperature from 'sensors -u'")
|
||||
return temperature
|
||||
|
||||
def get_mhz( self ):
|
||||
def get_mhz(self):
|
||||
try:
|
||||
output = open("/sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq").read()
|
||||
mhz = int(float(output)/1000.0)
|
||||
except:
|
||||
output = open("/proc/cpuinfo").read()
|
||||
m = re.search(r"cpu MHz\s+:\s+(\d+)", output)
|
||||
mhz = int(m.group(1))
|
||||
m = re.search(r"cpu MHz\s+:\s+(\d+)", output)
|
||||
mhz = int(m.group(1))
|
||||
|
||||
if mhz < 1000:
|
||||
return "{} MHz".format(mhz)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue