Skip to content

Commit 14782ee

Browse files
fix device.battery() error
Fixes #135
1 parent 3e657cf commit 14782ee

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

adbutils/shell.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,8 @@ def to_bool(v: str) -> bool:
513513
output = self.shell(["dumpsys", "battery"])
514514
shell_kvs = {}
515515
for line in output.splitlines():
516+
if ":" not in line:
517+
continue
516518
key, val = line.strip().split(':', 1)
517519
shell_kvs[key.strip()] = val.strip()
518520

0 commit comments

Comments
 (0)