Skip to content

Instantly share code, notes, and snippets.

@sils
Created July 15, 2015 08:40
Show Gist options
  • Save sils/3cb5d0a13a63827e8771 to your computer and use it in GitHub Desktop.
Save sils/3cb5d0a13a63827e8771 to your computer and use it in GitHub Desktop.
did_nothing = True
yielded_results = False
(sections,
local_bears,
global_bears,
targets) = gather_configuration(interactor.acquire_settings,
log_printer)
if bool(sections["default"].get("show_bears", "False")):
show_bears(local_bears,
global_bears,
interactor.show_bears)
did_nothing = False
else:
section_results = execute_enabled_sections(sections,
targets,
global_bears,
local_bears,
interactor,
log_printer)
did_nothing = len(section_results) == 0
for results in section_results:
yielded_results = yielded_results or results[0]
if did_nothing:
interactor.did_nothing()
if yielded_results:
exitcode = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment