From e694b51e6b36af5e61298d0c8db30515bc57c702 Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Thu, 11 Aug 2005 14:55:41 +0000 Subject: [PATCH] fix no interface module handling in segenxml --- refpolicy/Changelog | 1 + refpolicy/support/segenxml.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/refpolicy/Changelog b/refpolicy/Changelog index 5306a991..a78314e4 100644 --- a/refpolicy/Changelog +++ b/refpolicy/Changelog @@ -1,3 +1,4 @@ + * Fix segenxml to handle modules with no interfaces. * Rename ipsec connect interface for consistency. * Add missing parts of unix stream socket connect interface of ipsec. diff --git a/refpolicy/support/segenxml.py b/refpolicy/support/segenxml.py index 7222249e..43a40fd3 100755 --- a/refpolicy/support/segenxml.py +++ b/refpolicy/support/segenxml.py @@ -215,9 +215,13 @@ def getModuleXML(file_name): temp_buf = [] module_buf.append("\n") + # The file had no interfaces, just a header. + if phase == "get header": + module_buf += temp_buf + # If there are XML comments at the end of the file, they arn't # attributed to anything. These are ignored. - if len(temp_buf): + elif len(temp_buf): warning("orphan XML comments at bottom of file %s" % file_name) module_buf.append("\n")