#NEWLINE# def _policy_config( policy ) : #NEWLINE# #INDENT# '\n    Policy configuration\n    ' #NEWLINE# if ( policy is None ) : #NEWLINE# #INDENT# policy = DEFAULT_POLICY #NEWLINE# #UNINDENT# lines = [ POLICY_HEADER ] #NEWLINE# for entry in policy : #NEWLINE# #INDENT# entry . setdefault ( 'log_level' , '' ) #NEWLINE# entry . setdefault ( 'burst_limit' , '' ) #NEWLINE# lines . append ( ( POLICY_FORMAT % entry ) ) #NEWLINE# #UNINDENT# file ( '/etc/shorewall/policy' , contents = '' . join ( lines ) , use_sudo = True )