Skip to content

Commit

Permalink
Verbose command didn't propery add/remove the ?error_trace http param
Browse files Browse the repository at this point in the history
  • Loading branch information
matriv committed Jul 22, 2017
1 parent 681ed9a commit b5093c0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ Changes for crash
Unreleased
==========

- Fixed: ``\verbose`` command didn't not switch on verbosity if ``crash`` was
launched without the ```--verbose` flag.

2017/07/11 0.21.3
=================

Expand Down
5 changes: 5 additions & 0 deletions src/crate/crash/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ class ToggleVerboseCommand(Command):
@noargs_command
def __call__(self, cmd, *args, **kwargs):
cmd.error_trace = not cmd.error_trace
if cmd.error_trace:
cmd.connection.client.path += '?error_trace=1'
else:
cmd.connection.client.path.replace('?error_trace=1', '')

return 'Verbose {0}'.format(
cmd.error_trace and 'ON' or 'OFF'
)
Expand Down

0 comments on commit b5093c0

Please sign in to comment.