Skip to content

Commit c935fc1

Browse files
committed
Added RuntimeError when uiautomator is killed
- Version 3.1.2
1 parent ba8676a commit c935fc1

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

AndroidViewClient/src/com/dtmilano/android/viewclient.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@author: Diego Torres Milano
1818
'''
1919

20-
__version__ = '3.1.1'
20+
__version__ = '3.1.2'
2121

2222
import sys
2323
import subprocess
@@ -1790,8 +1790,11 @@ def dump(self, window=-1, sleep=1):
17901790
if DEBUG_RECEIVED:
17911791
print >>sys.stderr, "received %d chars" % len(received)
17921792
print >>sys.stderr
1793-
print >>sys.stderr, received
1793+
print >>sys.stderr, repr(received)
17941794
print >>sys.stderr
1795+
onlyKilledRE = re.compile('[\n\S]*Killed[\n\r\S]*', re.MULTILINE)
1796+
if onlyKilledRE.search(received):
1797+
raise RuntimeError('''ERROR: UiAutomator output contains no valid information. UiAutomator was killed, no reason given.''')
17951798
if self.ignoreUiAutomatorKilled:
17961799
if DEBUG_RECEIVED:
17971800
print >>sys.stderr, "ignoring UiAutomator Killed"

0 commit comments

Comments
 (0)