<s> import sys <EOL> import lxml . etree <EOL> import Bcfg2 . Logger <EOL> import Bcfg2 . Options <EOL> from Bcfg2 . Client . Tools . SELinux import SELinux <EOL> def main ( ) : <EOL> Bcfg2 . Options . get_parser ( <EOL> description = "<STR_LIT>" , <EOL> components = [ SELinux ] ) . parse ( ) <EOL> config = lxml . etree . Element ( "<STR_LIT>" ) <EOL> selinux = SELinux ( config ) <EOL> baseline = lxml . etree . Element ( "<STR_LIT>" , name = "<STR_LIT>" ) <EOL> for etype , handler in selinux . handlers . items ( ) : <EOL> baseline . append ( lxml . etree . Comment ( "<STR_LIT>" % etype ) ) <EOL> extra = handler . FindExtra ( ) <EOL> for entry in extra : <EOL> if etype != "<STR_LIT>" : <EOL> entry . tag = "<STR_LIT>" % etype <EOL> else : <EOL> entry . tag = "<STR_LIT:%s>" % etype <EOL> baseline . extend ( extra ) <EOL> print ( lxml . etree . tostring ( baseline , pretty_print = True ) ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> sys . exit ( main ( ) ) </s>
