diff --git a/src/jpl/pipedreams/plugins_ops.py b/src/jpl/pipedreams/plugins_ops.py index f81738d..12b2352 100644 --- a/src/jpl/pipedreams/plugins_ops.py +++ b/src/jpl/pipedreams/plugins_ops.py @@ -111,10 +111,12 @@ def get_new_plugin(self, name): # search for the plugin # print('plugin def not found, looking:', name) plugins = find_plugins(name) - if len(plugins) != 1: - # todo: throw error - print('More than one plugin found:', plugins) - return None + if len(plugins) == 0: + print('no plugin found:') + raise ModuleNotFoundError + elif len(plugins) > 1: + print('more than one plugin found:', plugins) + raise ImportError else: # print('plugin def found, adding and initializing:', name) plugin = plugins[0]