Skip to content

Commit

Permalink
Only output traceback if verbosity level > 2
Browse files Browse the repository at this point in the history
  • Loading branch information
homebysix committed Jan 21, 2020
1 parent 6b8914b commit ff4cf26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Code/autopkglib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ def process(self, recipe):
try:
self.env = processor.process()
except Exception as err:
if self.verbose:
if self.verbose > 2:
exc_type, exc_value, exc_traceback = sys.exc_info()
traceback.print_exc(file=sys.stdout)
traceback.print_tb(exc_traceback, limit=1, file=sys.stdout)
Expand Down Expand Up @@ -828,7 +828,7 @@ def get_processor(processor_name, verbose=None, recipe=None, env=None):
# if we aren't successful, that might be OK, we're
# going see if the processor was already imported
log_err(f"WARNING: {processor_filename}: {err}")
if verbose:
if verbose > 2:
exc_type, exc_value, exc_traceback = sys.exc_info()
traceback.print_exc(file=sys.stdout)
traceback.print_tb(exc_traceback, limit=1, file=sys.stdout)
Expand Down

0 comments on commit ff4cf26

Please sign in to comment.