diff options
author | Christophe CHAUVET <christophe.chauvet@gmail.com> | 2013-08-28 06:26:33 +0200 |
---|---|---|
committer | Christophe CHAUVET <christophe.chauvet@gmail.com> | 2013-08-28 06:26:33 +0200 |
commit | 47637469cf07c0b9c74227adb0a526e5b3867429 (patch) | |
tree | 59cd27d8b5719e687d7df19f8797b33390f7a715 /cliff | |
parent | cdffe7e60294e7c6ff1d0505d654a6b6d61b68c6 (diff) | |
download | cliff-47637469cf07c0b9c74227adb0a526e5b3867429.tar.gz |
Reraise error on debug
Diffstat (limited to 'cliff')
-rw-r--r-- | cliff/app.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cliff/app.py b/cliff/app.py index 2e65b6f..52ccc1b 100644 --- a/cliff/app.py +++ b/cliff/app.py @@ -260,7 +260,10 @@ class App(object): try: subcommand = self.command_manager.find_command(argv) except ValueError as err: - LOG.error(err) + if self.options.debug: + LOG.exception(err) + else: + LOG.error(err) return 1 cmd_factory, cmd_name, sub_argv = subcommand cmd = cmd_factory(self, self.options) |