policycoreutils: semanage: handle os errors

Rather than traceback, handle os errors and exit cleanly.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
This commit is contained in:
Eric Paris 2011-07-19 11:27:22 -04:00
parent b5c0a182ef
commit f2a74f4f87
1 changed files with 2 additions and 0 deletions

View File

@ -467,3 +467,5 @@ Object-specific Options (see above):
errorExit(_("Invalid value %s") % error.args[0]) errorExit(_("Invalid value %s") % error.args[0])
except IOError, error: except IOError, error:
errorExit(error.args[1]) errorExit(error.args[1])
except OSError, error:
errorExit(error.args[1])