diff mbox series

[3/4] python/audit2allow/sepolgen-ifgen: show errors on stderr

Message ID 20181221204333.27445-3-nicolas.iooss@m4x.org (mailing list archive)
State Not Applicable
Headers show
Series [1/4] python/sepolgen: close /etc/selinux/sepolgen.conf after parsing it | expand

Commit Message

Nicolas Iooss Dec. 21, 2018, 8:43 p.m. UTC
This allows test_audit2allow.py to display the errors correctly.

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
---
 python/audit2allow/sepolgen-ifgen | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/python/audit2allow/sepolgen-ifgen b/python/audit2allow/sepolgen-ifgen
index aa1ae8dc21d2..e3f67d430647 100644
--- a/python/audit2allow/sepolgen-ifgen
+++ b/python/audit2allow/sepolgen-ifgen
@@ -135,8 +135,7 @@  def main():
     try:
         headers = refparser.parse_headers(options.headers, output=log, debug=options.debug)
     except ValueError as e:
-        print("error parsing headers")
-        print(str(e))
+        sys.stderr.write("error parsing headers: %s\n" % e)
         return 1
 
     if_set = interfaces.InterfaceSet(output=log)