From 4a5308b4abc0511542b17e0e182917e0ccf4adf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Fri, 24 Nov 2017 10:51:14 +0100 Subject: [PATCH] Fix plugin detection only finding one plugin We actually should iterate over ALL of the generator, not just its first entry m) --- src/octoprint/plugin/core.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/octoprint/plugin/core.py b/src/octoprint/plugin/core.py index 04b000c8..9d16a2ae 100644 --- a/src/octoprint/plugin/core.py +++ b/src/octoprint/plugin/core.py @@ -639,13 +639,12 @@ class PluginManager(object): def wrapped(gen): # to protect against some issues in installed packages that make iteration over entry points # fall on its face - e.g. https://groups.google.com/forum/#!msg/octoprint/DyXdqhR0U7c/kKMUsMmIBgAJ - try: - yield next(gen) - except StopIteration: - raise - except: - self.logger.exception("Something went wrong while processing the entry points of a package in the " - "Python environment - broken entry_points.txt in some package?") + for entry in gen: + try: + yield entry + except: + self.logger.exception("Something went wrong while processing the entry points of a package in the " + "Python environment - broken entry_points.txt in some package?") for group in groups: for entry_point in wrapped(working_set.iter_entry_points(group=group, name=None)):