Skip to content

Commit 2af326d

Browse files
committed
Merge pull request #2 from sdelements/return-multiple-errors
Return errors for multiple types
2 parents 5386923 + 5581e82 commit 2af326d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

yantra/manager.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,11 @@ def _get_container(self, plugin_type):
119119
except KeyError:
120120
raise AssertionError("No plugins found for type: {0}: ".format(plugin_type))
121121

122-
def get_errors(self, plugin_type):
123-
return self._get_container(plugin_type).errors
122+
def get_errors(self, *plugin_types):
123+
errors = {}
124+
for plugin_type in plugin_types:
125+
errors.update(self._get_container(plugin_type).errors)
126+
return errors
124127

125128
def register_plugin_type(self, plugin_type):
126129
assert isinstance(plugin_type, PluginType)

0 commit comments

Comments
 (0)