Skip to content

Commit

Permalink
Merge pull request #609 from autopkg/traceback-verbosity
Browse files Browse the repository at this point in the history
Only output traceback if verbosity level > 2
  • Loading branch information
nmcspadden committed Feb 7, 2020
2 parents 5106597 + ff4cf26 commit b0d0931
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 @@ -899,7 +899,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 b0d0931

Please sign in to comment.