Bug 1606793 - Intermittent UnicodeDecodeError/UnicodeEncodeError r=rwood

Some adb logs produce badly encoded characters, producing errors.
Since the log is just informative, and getting pulled after the work
is done, we can ignore these errors and just warn that the adb logs
could not be retrieved.

Differential Revision: https://phabricator.services.mozilla.com/D58801

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Tarek Ziadé 2020-01-06 19:15:29 +00:00
parent cddc9adb37
commit b380a4a808

View File

@ -220,7 +220,8 @@ class AndroidEnv(BaseEnv):
def dump_logs(self):
try:
logcat = self.device.get_logcat()
except ADBError:
# ValueError will cover all cases of Unicode encode/decode errors
except (ADBError, ValueError):
ERROR("logcat call failure")
return