Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def main():
plugin = PluginBase(ErrorClient())
plugin.run()
def main():
if len(sys.argv) < 3:
raise StartupError("2 arguments (host and port) are "
"required only %d was provided." % len(sys.argv))
host = sys.argv[1]
port = sys.argv[2]
plugin = PluginBase(ComplexClient(host, port))
plugin.run()
def main():
args = sys.argv
if len(args) < 1:
try:
number_of_times_to_sleep = int(args[0])
except (ValueError, TypeError):
number_of_times_to_sleep = None
else:
number_of_times_to_sleep = None
plugin = PluginBase(SleeperClient(number_of_times_to_sleep), max_concurrent=5)
plugin.run()
def main():
plugin = PluginBase(DynamicClient())
plugin.run()
def main():
args = sys.argv
if len(args) < 1:
try:
number_of_times_to_sleep = int(args[0])
except (ValueError, TypeError):
number_of_times_to_sleep = None
else:
number_of_times_to_sleep = None
plugin = PluginBase(SleeperClient(number_of_times_to_sleep))
plugin.run()
import warnings
from brewtils.plugin import PluginBase
class LocalPlugin(PluginBase):
pass
class SimpleLocalPlugin(LocalPlugin):
"""Simple Local Plugin for use by Plugin developers"""
def __init__(self, client, logger=None):
super(SimpleLocalPlugin, self).__init__(
client, logger=logger, multithreaded=False
)
warnings.warn(
"Call made to 'SimpleLocalPlugin'. This name will be removed "
"in version 3.0, please use 'LocalPlugin' instead.",
DeprecationWarning,
stacklevel=2,
)
def main():
plugin = PluginBase(EchoClient())
plugin.run()
def main():
plugin = PluginBase(CustomDisplayClient())
plugin.run()