Skip to content

Commit

Permalink
Added RuntimeError when uiautomator is killed
Browse files Browse the repository at this point in the history
- Version 3.1.2
  • Loading branch information
dtmilano committed Jul 26, 2013
1 parent ba8676a commit c935fc1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions AndroidViewClient/src/com/dtmilano/android/viewclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@author: Diego Torres Milano
'''

__version__ = '3.1.1'
__version__ = '3.1.2'

import sys
import subprocess
Expand Down Expand Up @@ -1790,8 +1790,11 @@ def dump(self, window=-1, sleep=1):
if DEBUG_RECEIVED:
print >>sys.stderr, "received %d chars" % len(received)
print >>sys.stderr
print >>sys.stderr, received
print >>sys.stderr, repr(received)
print >>sys.stderr
onlyKilledRE = re.compile('[\n\S]*Killed[\n\r\S]*', re.MULTILINE)
if onlyKilledRE.search(received):
raise RuntimeError('''ERROR: UiAutomator output contains no valid information. UiAutomator was killed, no reason given.''')
if self.ignoreUiAutomatorKilled:
if DEBUG_RECEIVED:
print >>sys.stderr, "ignoring UiAutomator Killed"
Expand Down

0 comments on commit c935fc1

Please sign in to comment.