policycoreutils: semanage: Catch RuntimeErrors, that can be generated when SELinux is disabled

Exit cleanly instead of python getting angry when SELinux is disabled.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
This commit is contained in:
Dan Walsh 2011-09-01 10:50:27 -04:00 committed by Eric Paris
parent 7bfaa63839
commit 42a523c0bd
1 changed files with 2 additions and 0 deletions

View File

@ -564,3 +564,5 @@ Object-specific Options (see above):
errorExit(error.args[1])
except OSError, error:
errorExit(error.args[1])
except RuntimeError, error:
errorExit(error.args[0])