Skip to content

Commit

Permalink
Resolve no-else-raise linter errors.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 236714504
Change-Id: Ifaeee426ee05a5e5deb3039639da6bd6ab8de7d8
  • Loading branch information
dbieber authored and copybara-github committed Mar 4, 2019
1 parent 1c1f6dd commit 36fcb19
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions fire/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,30 +133,30 @@ def Fire(component=None, command=None, name=None):
if component_trace.HasError():
_DisplayError(component_trace)
raise FireExit(2, component_trace)
elif component_trace.show_trace and component_trace.show_help:
if component_trace.show_trace and component_trace.show_help:
output = ['Fire trace:\n{trace}\n'.format(trace=component_trace)]
result = component_trace.GetResult()
help_string = helputils.HelpString(
result, component_trace, component_trace.verbose)
output.append(help_string)
Display(output)
raise FireExit(0, component_trace)
elif component_trace.show_trace:
if component_trace.show_trace:
output = ['Fire trace:\n{trace}'.format(trace=component_trace)]
Display(output)
raise FireExit(0, component_trace)
elif component_trace.show_help:
if component_trace.show_help:
result = component_trace.GetResult()
help_string = helputils.HelpString(
result, component_trace, component_trace.verbose)
output = [help_string]
Display(output)
raise FireExit(0, component_trace)
else:
# The command succeeded normally; print the result.
_PrintResult(component_trace, verbose=component_trace.verbose)
result = component_trace.GetResult()
return result

# The command succeeded normally; print the result.
_PrintResult(component_trace, verbose=component_trace.verbose)
result = component_trace.GetResult()
return result


def Display(lines):
Expand Down

0 comments on commit 36fcb19

Please sign in to comment.