diff options
author | Doug Hellmann <doug.hellmann@dreamhost.com> | 2012-04-29 15:06:11 -0400 |
---|---|---|
committer | Doug Hellmann <doug.hellmann@dreamhost.com> | 2012-04-29 15:06:11 -0400 |
commit | 00b9564a09484b62d9de55c0db2f726e0b79b020 (patch) | |
tree | 4beb082a7d76857f3b85e3a02e03a555cd84b8c7 /cliff | |
parent | 2b3f9b1fa84fcc496e4bf0762a67a7d6cce1b287 (diff) | |
download | cliff-00b9564a09484b62d9de55c0db2f726e0b79b020.tar.gz |
100% coverage of cliff.app module
Diffstat (limited to 'cliff')
-rw-r--r-- | cliff/app.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cliff/app.py b/cliff/app.py index d1ddf84..119f78a 100644 --- a/cliff/app.py +++ b/cliff/app.py @@ -192,10 +192,9 @@ class App(object): parsed_args = cmd_parser.parse_args(sub_argv) result = cmd.run(parsed_args) except Exception as err: + LOG.error('ERROR: %s', err) if self.options.debug: LOG.exception(err) - raise - LOG.error('ERROR: %s', err) try: self.clean_up(cmd, result, err) except Exception as err2: @@ -203,6 +202,8 @@ class App(object): LOG.exception(err2) else: LOG.error('Could not clean up: %s', err2) + if self.options.debug: + raise else: try: self.clean_up(cmd, result, None) |