зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1499902 - Improve device failure handling in AndroidMixin; r=bc
AndroidMixin properties are queried by mozharness prior to __init__ completion, so AttributeError is expected and is fairly safe to ignore, but other exceptions should be reported.
This commit is contained in:
Родитель
2ed3dd4f7d
Коммит
fa50cda6d3
|
@ -55,7 +55,7 @@ class AndroidMixin(object):
|
|||
|
||||
@property
|
||||
def device(self):
|
||||
if not self._device:
|
||||
if not self._device and self.adb_path:
|
||||
try:
|
||||
import mozdevice
|
||||
self._device = mozdevice.ADBAndroid(adb=self.adb_path,
|
||||
|
@ -63,7 +63,7 @@ class AndroidMixin(object):
|
|||
verbose=True)
|
||||
self.info("New mozdevice with adb=%s, device=%s" %
|
||||
(self.adb_path, self.device_serial))
|
||||
except Exception:
|
||||
except AttributeError:
|
||||
# As in adb_path, above.
|
||||
pass
|
||||
return self._device
|
||||
|
|
Загрузка…
Ссылка в новой задаче