Logo Search packages:      
Sourcecode: ufw version File versions

def src::frontend::UFWFrontend::do_application_action (   self,
  action,
  profile 
)

Perform action on profile. action and profile are usually based on
   return values from parse_applications_command().

Definition at line 681 of file frontend.py.

00681                                                     :
        '''Perform action on profile. action and profile are usually based on
           return values from parse_applications_command().
        '''
        res = ""
        if action == "default-allow":
            res = self.set_default_application_policy("allow")
        elif action == "default-deny":
            res = self.set_default_application_policy("deny")
        elif action == "default-skip":
            res = self.set_default_application_policy("skip")
        elif action == "list":
            res = self.get_application_list()
        elif action == "info":
            res = self.get_application_info(profile)
        elif action == "update" or action == "update-with-new":
            res = self.application_update(profile)
            if action == "update-with-new":
                res += "\n" + self.application_add(profile)
        else:
            err_msg = _("Unsupported action '%s'") % (action)
            raise UFWError(err_msg)

        return res



Generated by  Doxygen 1.6.0   Back to index