Namespace 'bitmessage' for plugins entry points

This commit is contained in:
Dmitri Bogomolov 2017-03-24 14:31:27 +02:00
parent c8a47b988f
commit b77eb0c7e5
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13
2 changed files with 4 additions and 4 deletions

View File

@ -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]'
],

View File

@ -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