When running with --verbose, do not hide the stack trace from the user
when an exception is raised. It is most helpful to figure out when the
exception actually happened.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
setup_statedir(args.statedir)
setup_sysconfdir(args.sysconfdir)
- try:
+ if args.verbose:
args.func(args)
+ else:
+ main_catch(args.func, args)
+
+def main_catch(func, args):
+
+ try:
+ func(args)
except Error as e:
raise SystemExit(