зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1210157 - Add a --debug option to bootstrap.py r=nalexander
Add an option to run bootstrap.py with '--debug'. This will print full tracebacks if the bootstrap process encounters an uncaught exception. It should be useful for developers who are working on the bootstrap code as well as users when writing bug reports. Depends on D39362 Differential Revision: https://phabricator.services.mozilla.com/D39363 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
bc36ca8edd
Коммит
6aec656a0f
|
@ -154,6 +154,9 @@ def main(args):
|
|||
'instead of using the default interactive prompt.')
|
||||
parser.add_option('--no-interactive', dest='no_interactive', action='store_true',
|
||||
help='Answer yes to any (Y/n) interactive prompts.')
|
||||
parser.add_option('--debug', dest='debug', action='store_true',
|
||||
help='Print extra runtime information useful for debugging and '
|
||||
'bug reports.')
|
||||
|
||||
options, leftover = parser.parse_args(args)
|
||||
|
||||
|
@ -165,6 +168,11 @@ def main(args):
|
|||
print('Could not load the bootstrap Python environment.\n')
|
||||
print('This should never happen. Consider filing a bug.\n')
|
||||
print('\n')
|
||||
|
||||
if options.debug:
|
||||
# Raise full tracebacks during debugging and for bug reporting.
|
||||
raise
|
||||
|
||||
print(e)
|
||||
return 1
|
||||
dasboot = cls(choice=options.application_choice, no_interactive=options.no_interactive,
|
||||
|
|
Загрузка…
Ссылка в новой задаче