From c2d3752bc595a4f0be7d156538594078ab8d8d01 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 21 Apr 2021 23:57:19 -0600 Subject: [PATCH] Update TryAndPrint() --- scripts/wk/std.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/wk/std.py b/scripts/wk/std.py index b8f6910a..c568c499 100644 --- a/scripts/wk/std.py +++ b/scripts/wk/std.py @@ -569,13 +569,11 @@ class TryAndPrint(): verbose, ) f_exception = None + catch_all = catch_all if catch_all else self.catch_all msg_good = msg_good if msg_good else self.msg_good output = None result_msg = 'UNKNOWN' - if catch_all is None: - catch_all = self.catch_all - if verbose is None: - verbose = self.verbose + verbose = verbose if verbose else self.verbose # Build exception tuples e_exceptions = tuple(self._get_exception(e) for e in self.list_errors) @@ -619,8 +617,8 @@ class TryAndPrint(): # Done self._log_result(message, result_msg) return { - 'Failed': bool(f_exception), 'Exception': f_exception, + 'Failed': bool(f_exception), 'Output': output, }