fix #22
This commit is contained in:
@@ -38,8 +38,8 @@ power = {'source': None, 'method': 'polling'}
|
|||||||
|
|
||||||
|
|
||||||
def writemsr(msr, val):
|
def writemsr(msr, val):
|
||||||
n = glob.glob('/dev/cpu/[0-9]*/msr')
|
n = ['/dev/cpu/{:d}/msr'.format(x) for x in range(cpu_count())]
|
||||||
if not n:
|
if not os.path.exists(n[0]):
|
||||||
try:
|
try:
|
||||||
subprocess.check_call(('modprobe', 'msr'))
|
subprocess.check_call(('modprobe', 'msr'))
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
|
|||||||
Reference in New Issue
Block a user