Bug 1119838 - Raise exception early when there is no adb command available; r=bclary

This commit is contained in:
Julien Pagès 2015-01-19 11:15:53 -05:00
parent 12de551623
commit e2d2912934

View File

@ -146,6 +146,14 @@ class ADBCommand(object):
self._logger.debug("%s: %s" % (self.__class__.__name__,
self.__dict__))
# catch early a missing or non executable adb command
try:
subprocess.Popen([adb, 'help'],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE).communicate()
except Exception, exc:
raise ADBError('%s: %s is not executable.' % (exc, adb))
def _get_logger(self, logger_name):
logger = None
try: