From 1c38921365ff0b24da7c302133cd12d91e27de17 Mon Sep 17 00:00:00 2001 From: Miroslav Grepl Date: Mon, 23 Jul 2012 17:13:29 +0200 Subject: [PATCH] Fix genman.py to correct PORT part --- genman.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/genman.py b/genman.py index e7c75720..17232fa4 100755 --- a/genman.py +++ b/genman.py @@ -302,6 +302,7 @@ SELinux %(domainname)s policy is very flexible allowing users to setup their %(d The following port types are defined for %(domainname)s:""" % {'domainname':self.domainname}) for p in self.ports: + print p self.fd.write(""" .EX @@ -311,8 +312,9 @@ The following port types are defined for %(domainname)s:""" % {'domainname':self .EE """ % p) once = True - for p in ( "tcp", "udp" ): - if (f,p) in portrecs: + for prot in ( "tcp", "udp" ): + if (p,prot) in portrecs: + print (p,prot) if once: self.fd.write(""" @@ -320,7 +322,7 @@ Default Defined Ports:""") once = False self.fd.write(r""" %s %s -.EE""" % (p, ",".join(portrecs[(f,p)]))) +.EE""" % (prot, ",".join(portrecs[(p,prot)]))) def file_context(self): self.fd.write(r"""