Bug 1577517 - [mozbuild] Fix bug in error handling case when 'terminal-notifier' is not installed, r=firefox-build-system-reviewers,mshal

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andrew Halberstadt 2019-09-04 17:50:56 +00:00
Родитель f97af149f2
Коммит b491b45f70
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -610,7 +610,7 @@ class MozbuildObject(ProcessExecutionMixin):
'Mozilla Build System', msg], ensure_exit_code=False)
except Exception as e:
self.log(logging.WARNING, 'notifier-failed',
{'error': e}, 'Notification center failed: {error}')
{'error': str(e)}, 'Notification center failed: {error}')
def _ensure_objdir_exists(self):
if os.path.isdir(self.statedir):
@ -913,7 +913,7 @@ class MachCommandBase(MozbuildObject):
fd = open(logfile, "wb")
self.log_manager.add_json_handler(fd)
except Exception as e:
self.log(logging.WARNING, 'mach', {'error': e},
self.log(logging.WARNING, 'mach', {'error': str(e)},
'Log will not be kept for this command: {error}.')