rgb-cln/tests/plugins/broken.py

20 lines
500 B
Python
Executable File

#!/usr/bin/env python3
"""Simple plugin to test that lightningd doesnt crash if it starts a
misbehaving plugin via RPC.
"""
from lightning import Plugin
import an_unexistent_module_that_will_make_me_crash
plugin = Plugin(dynamic=False)
@plugin.init()
def init(options, configuration, plugin):
plugin.log("broken.py initializing {}".format(configuration))
# We need to actually use the import to pass source checks..
an_unexistent_module_that_will_make_me_crash.hello()
plugin.run()