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

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