Skip to content

Commit 841d95b

Browse files
committed
common: Remove references to pkg_resources
Even though the comment here attributed this to stevedore, it was in fact the use of pkg_resources that changed things. Change-Id: I35377dd7d773024aa6423b72b1412e11b1b6f2e4 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
1 parent a7e2f31 commit 841d95b

2 files changed

Lines changed: 2 additions & 14 deletions

File tree

openstackclient/common/clientmanager.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -158,16 +158,7 @@ def get_plugin_modules(group):
158158
for ep in mgr:
159159
LOG.debug('Found plugin %s', ep.name)
160160

161-
# Different versions of stevedore use different
162-
# implementations of EntryPoint from other libraries, which
163-
# are not API-compatible.
164-
try:
165-
module_name = ep.entry_point.module_name
166-
except AttributeError:
167-
try:
168-
module_name = ep.entry_point.module
169-
except AttributeError:
170-
module_name = ep.entry_point.value
161+
module_name = ep.entry_point.module
171162

172163
try:
173164
module = importlib.import_module(module_name)

openstackclient/shell.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,7 @@ def _final_defaults(self):
7474
self._auth_type = 'password'
7575

7676
def _load_plugins(self):
77-
"""Load plugins via stevedore
78-
79-
osc-lib has no opinion on what plugins should be loaded
80-
"""
77+
"""Load plugins via stevedore."""
8178
# Loop through extensions to get API versions
8279
for mod in clientmanager.PLUGIN_MODULES:
8380
default_version = getattr(mod, 'DEFAULT_API_VERSION', None)

0 commit comments

Comments
 (0)