Server IP : 92.204.138.22 / Your IP : 18.222.116.55 Web Server : Apache System : Linux ns1009439.ip-92-204-138.us 4.18.0-553.8.1.el8_10.x86_64 #1 SMP Tue Jul 2 07:26:33 EDT 2024 x86_64 User : internationaljou ( 1019) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/lib/panopta-agent/library/ |
Upload File : |
""" Module to handle plugin blacklisting operations, like setting default plugins to be blacklisted, etc. """ DEFAULT_BLACKLISTED_PLUGINS = ['package_upgrade'] class PluginBlacklister(object): """ Class to handle operations regarding blacklisting of plugins. """ def __init__(self, default_plugins=DEFAULT_BLACKLISTED_PLUGINS): self._default_plugins = default_plugins def update_list(self, plugin_list): """ Update a plugin blacklist with the defaults ones. """ if plugin_list: user_plugins = plugin_list.split(',') user_plugins = [plugin.strip() for plugin in user_plugins] else: user_plugins = [] plugin_set = set(user_plugins + self._default_plugins) return ','.join(plugin_set)