From c2a45030b44a64e6594997d4d702cccc084ddfbe Mon Sep 17 00:00:00 2001 From: Kristian Larsson Date: Thu, 23 Jul 2015 18:58:20 +0200 Subject: [PATCH] Catch all exceptions to suppress error messages There are cases, such as when .nipaprc doesn't exist, that prevents helper-nipap to work completely. Suppressing any such error message seems to be the only reasonable option and therefore I've modified this try/except clause to match all exceptions. Fixes #711. --- nipap-cli/helper-nipap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nipap-cli/helper-nipap b/nipap-cli/helper-nipap index 53c0f6dd7..f6432b72e 100755 --- a/nipap-cli/helper-nipap +++ b/nipap-cli/helper-nipap @@ -48,7 +48,7 @@ if __name__ == '__main__': try: cmd = Command(nipap_cli.cmds, args) comp = sorted(cmd.complete()) - except (NipapError, InvalidCommand): + except Exception: # handle errors silently pass