Skip to content

Commit bd5b44d

Browse files
committed
Prevent loading of duplicate nentry points
1 parent 0f78ab9 commit bd5b44d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGES.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ History
55
3.1.2 (unreleased)
66
------------------
77

8+
- Prevent loading of duplicate entry points.
9+
[rnix]
10+
811
- Introduce ``empty_display_value`` widget property. Select display renderer
912
uses it if vocabulary not contains value.
1013
[lenadax]

src/yafowil/utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ def get_plugins(ns=None):
7070
if _yafowil_plugins is None:
7171
_yafowil_plugins = list()
7272
for ep in iter_entry_points('yafowil.plugin'):
73+
# prevent loading of duplicate entry points
74+
if not ep.module_name.startswith(ep.dist.project_name):
75+
continue
7376
cb = ep.load()
7477
_yafowil_plugins.append((ep, cb))
7578
_yafowil_plugins = sorted(

0 commit comments

Comments
 (0)