From 0af99256c6e45a0bf8571cc2451b3cb30401fa0d Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Fri, 15 Mar 2019 09:25:00 -0400 Subject: [PATCH] genhomedircon.py: Fix top-level exception handling. Fixes errors like this: Traceback (most recent call last): File "support/genhomedircon.py", line 490, in errorExit("Options Error " + error) TypeError: Can't convert 'GetoptError' object to str implicitly Signed-off-by: Chris PeBenito --- support/genhomedircon.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/support/genhomedircon.py b/support/genhomedircon.py index 6662f412a..3503fb4a8 100644 --- a/support/genhomedircon.py +++ b/support/genhomedircon.py @@ -486,9 +486,5 @@ try: selconf=selinuxConfig(directory, setype, usepwd) selconf.write() -except getopt.error as error: - errorExit("Options Error " + error) -except ValueError as error: - errorExit("ValueError " + error) -except IndexError: - errorExit("IndexError") +except Exception as error: + errorExit(error)