1
0
mirror of https://github.com/AndrewX192/lenovo-sa120-fanspeed-utility synced 2025-12-06 01:23:19 +00:00

Show sleep message after p.communicate output

This commit is contained in:
d10n
2017-04-15 17:28:51 -04:00
parent 20c1641cbd
commit 48093212d7

View File

@@ -102,8 +102,8 @@ def set_fan_speeds(device, speed):
output.write(b'\n')
p = Popen(['sg_ses', '-p', '0x2', device, '--control', '--data', '-'], stdout=PIPE, stdin=PIPE,
stderr=PIPE)
print('Set fan speeds... Waiting to get fan speeds (ctrl+c to skip)')
print(p.communicate(input=output.getvalue())[0].decode('utf-8'))
print('Set fan speeds... Waiting to get fan speeds (ctrl+c to skip)')
try:
time.sleep(10)
print_speeds(device)