Never raise errors if dependencies can't be found in a batch of metadata, since this prevents user plugins from depending on built-in plugins
This commit is contained in:
Родитель
d83b09064d
Коммит
4819b48800
|
@ -198,14 +198,9 @@ c.using_dojo_source = False
|
||||||
# stack key here
|
# stack key here
|
||||||
c.errorstack_key = None
|
c.errorstack_key = None
|
||||||
|
|
||||||
# If you're running from a build, you don't necessarily want to raise plugin
|
|
||||||
# dependency errors
|
|
||||||
c.raise_plugin_dependency_errors = False
|
|
||||||
|
|
||||||
def set_profile(profile):
|
def set_profile(profile):
|
||||||
if profile == "test" or profile == "dev":
|
if profile == "test" or profile == "dev":
|
||||||
client_plugin_path = path.getcwd() / ".." / "bespinclient" / "plugins"
|
client_plugin_path = path.getcwd() / ".." / "bespinclient" / "plugins"
|
||||||
c.raise_plugin_dependency_errors = True
|
|
||||||
|
|
||||||
c.plugin_path = [dict(name="supported",
|
c.plugin_path = [dict(name="supported",
|
||||||
path=client_plugin_path / "supported"),
|
path=client_plugin_path / "supported"),
|
||||||
|
|
|
@ -249,11 +249,7 @@ def filter_plugins(plugin_list, predicate):
|
||||||
for dep_name in plugin.dependencies:
|
for dep_name in plugin.dependencies:
|
||||||
dep = dep_graph.get(dep_name)
|
dep = dep_graph.get(dep_name)
|
||||||
if dep is None:
|
if dep is None:
|
||||||
if config.c.raise_plugin_dependency_errors:
|
continue
|
||||||
raise PluginError("Unable to find plugin "
|
|
||||||
+ dep_name + " while creating metadata list")
|
|
||||||
else:
|
|
||||||
continue
|
|
||||||
dep.append(plugin_name)
|
dep.append(plugin_name)
|
||||||
|
|
||||||
# Build up a blacklist.
|
# Build up a blacklist.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче