mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
Warn cleanly if outputter not available
This commit is contained in:
parent
7351cb31a6
commit
2fd8852ab0
@ -52,7 +52,11 @@ def update_progress(opts, progress, progress_iter, out):
|
||||
Update the progress iterator for the given outputter
|
||||
'''
|
||||
# Look up the outputter
|
||||
progress_outputter = salt.loader.outputters(opts)[out]
|
||||
try:
|
||||
progress_outputter = salt.loader.outputters(opts)[out]
|
||||
except KeyError: # Outputter is not loaded
|
||||
log.warning('Progress outputter not available.')
|
||||
return False
|
||||
progress_outputter(progress, progress_iter)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user