Namespace 'bitmessage' for plugins entry points

master
Dmitri Bogomolov 7 years ago
parent c8a47b988f
commit b77eb0c7e5
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13

@ -276,15 +276,15 @@ if __name__ == "__main__":
ext_modules=[bitmsghash],
zip_safe=False,
entry_points={
'gui.menu': [
'bitmessage.gui.menu': [
'popMenuYourIdentities.qrcode = '
'pybitmessage.plugins.qrcodeui [qrcode]'
],
'notification.message': [
'bitmessage.notification.message': [
'notify2 = pybitmessage.plugins.notification_notify2'
'[notify2]'
],
'notification.sound': [
'bitmessage.notification.sound': [
'file.fallback = pybitmessage.plugins.sound_playfile'
'[sound]'
],

@ -9,7 +9,7 @@ def get_plugins(group, point='', name=None, fallback=None):
which name starts with `point` or equals to `name`.
If `fallback` kwarg specified, plugin with that name yield last.
"""
for ep in pkg_resources.iter_entry_points(group):
for ep in pkg_resources.iter_entry_points('bitmessage.' + group):
if name and ep.name == name or ep.name.startswith(point):
try:
plugin = ep.load().connect_plugin

Loading…
Cancel
Save