The pki-server CLI has been modified to catch all exceptions and display a simple exception message. In verbose mode it will display the stack trace.
https://fedorahosted.org/pki/ticket/2381 Pushed to master under one-liner/trivial rule. -- Endi S. Dewata
>From 9a7f5f8febe7ff044bcda109f57d493e606cbea1 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" <[email protected]> Date: Wed, 6 Jul 2016 23:02:18 +0200 Subject: [PATCH] Added general exception handling for pki-server CLI. The pki-server CLI has been modified to catch all exceptions and display a simple exception message. In verbose mode it will display the stack trace. https://fedorahosted.org/pki/ticket/2381 --- base/server/sbin/pki-server | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/base/server/sbin/pki-server b/base/server/sbin/pki-server index cea62b7e4ddb45a1aa8a14d0f5b2dcf873427b67..6df70dc848680aef2f54b93e0d8bc0a776a4a292 100644 --- a/base/server/sbin/pki-server +++ b/base/server/sbin/pki-server @@ -116,3 +116,9 @@ if __name__ == '__main__': traceback.print_exc() print('ERROR: %s' % e) sys.exit(e.returncode) + + except Exception as e: # pylint: disable=broad-except + if cli.verbose: + traceback.print_exc() + print('ERROR: %s' % e) + sys.exit(1) -- 2.5.5
_______________________________________________ Pki-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/pki-devel
