chiark
/
gitweb
/
~ianmdlvl
/
fdroidserver.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57fde3d
)
Avoid strange outcomes of "adb devices"
author
Daniel Martí
<mvdan@mvdan.cc>
Thu, 26 Dec 2013 18:18:36 +0000
(19:18 +0100)
committer
Daniel Martí
<mvdan@mvdan.cc>
Thu, 9 Jan 2014 15:23:47 +0000
(16:23 +0100)
fdroidserver/install.py
patch
|
blob
|
history
diff --git
a/fdroidserver/install.py
b/fdroidserver/install.py
index b61cfcb447de49bf0331aa562c5a69f275e0fbfe..0f444cff49aa2a57f0c0bb8cbdf4f12f83aaa691 100644
(file)
--- a/
fdroidserver/install.py
+++ b/
fdroidserver/install.py
@@
-33,7
+33,11
@@
def devices():
p = FDroidPopen(["adb", "devices"])
if p.returncode != 0:
raise Exception("An error occured when finding devices: %s" % p.stderr)
- return [l.split()[0] for l in p.stdout.splitlines()[1:-1]]
+ lines = p.stdout.splitlines()
+ if len(lines) < 3:
+ return []
+ lines = lines[1:-1]
+ return [l.split()[0] for l in lines]
def main():