Remove __progress__ from lint checks, and add in jid_event

This commit is contained in:
Thomas Jackson 2014-12-31 19:16:59 -08:00
parent a2fcfc2dd7
commit 1e1107272a
3 changed files with 2 additions and 10 deletions

View file

@ -194,7 +194,7 @@ dummy-variables-rgx=_|dummy
# List of additional names supposed to be defined in builtins. Remember that
# you should avoid to define new builtins when possible.
additional-builtins=__opts__,__salt__,__pillar__,__grains__,__context__,__ret__,__env__,__low__,__states__,__lowstate__,__running__,__active_provider_name__,__master_opts__,__progress__
additional-builtins=__opts__,__salt__,__pillar__,__grains__,__context__,__ret__,__env__,__low__,__states__,__lowstate__,__running__,__active_provider_name__,__master_opts__,__jid_event__
[SIMILARITIES]

View file

@ -154,7 +154,7 @@ indent-string=' '
# List of additional names supposed to be defined in builtins. Remember that
# you should avoid to define new builtins when possible.
additional-builtins=__opts__,__salt__,__pillar__,__grains__,__context__,__ret__,__env__,__low__,__states__,__lowstate__,__running__,__active_provider_name__,__master_opts__,__progress__
additional-builtins=__opts__,__salt__,__pillar__,__grains__,__context__,__ret__,__env__,__low__,__states__,__lowstate__,__running__,__active_provider_name__,__master_opts__,__jid_event__
[IMPORTS]

View file

@ -184,14 +184,6 @@ class SyncClientMixin(object):
'__jid_event__': salt.utils.event.NamespacedEvent(event, tag),
}
# TODO: some other way? This seems like a slippery slope of convenience functions
def fire_progress(data, outputter='pprint'):
progress_event = {'data': data,
'outputter': outputter}
func_globals['__jid_event__'].fire_event(progress_event, 'progress')
func_globals['__progress__'] = fire_progress
# overload the print function (assuming the module did `from __future__ import print_function`)
def over_print(output):
'''
Print and duplicate the print to an event