from copy import deepcopy
from http import HTTPStatus
from os import mkdir
-from pkg_resources import iter_entry_points
+from importlib_metadata import entry_points
from shutil import rmtree
from unittest.mock import Mock
)
elif len(vim_images) > 1:
raise NsWorkerException(
- "More than one network found with this criteria: '{}'".format(
+ "More than one image found with this criteria: '{}'".format(
task["find_params"]
)
)
return self.plugins[name]
try:
- for v in iter_entry_points("osm_ro{}.plugins".format(type), name):
- self.plugins[name] = v.load()
+ for ep in entry_points(group="osm_ro{}.plugins".format(type), name=name):
+ self.plugins[name] = ep.load()
except Exception as e:
raise NsWorkerException("Cannot load plugin osm_{}: {}".format(name, e))