mirror of
https://github.com/erpalma/throttled.git
synced 2026-03-10 15:03:54 +01:00
Upower now also reports "pending-charge", fixes #303
This commit is contained in:
parent
970001ec38
commit
fb788f9005
|
|
@ -316,7 +316,7 @@ def is_on_battery(config):
|
|||
res = re.search(rb'state:\s+(.+)', out).group(1).decode().strip()
|
||||
if res == 'discharging':
|
||||
return True
|
||||
elif res in ('fully-charged', 'charging'):
|
||||
elif res in ('fully-charged', 'charging', 'pending-charge'):
|
||||
return False
|
||||
except:
|
||||
pass
|
||||
|
|
|
|||
Loading…
Reference in a new issue