Skip to content

Commit

Permalink
fix #22
Browse files Browse the repository at this point in the history
  • Loading branch information
erpalma committed Jul 30, 2018
1 parent 6c38278 commit 2eca077
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lenovo_fix.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@


def writemsr(msr, val):
n = glob.glob('/dev/cpu/[0-9]*/msr')
if not n:
n = ['/dev/cpu/{:d}/msr'.format(x) for x in range(cpu_count())]
if not os.path.exists(n[0]):
try:
subprocess.check_call(('modprobe', 'msr'))
except subprocess.CalledProcessError:
Expand Down

0 comments on commit 2eca077

Please sign in to comment.