Remove unused code
The 'load_entry_point' method has not been used since Ia649db257c416ca054977812ecb3f1a8044fa584. TrivialFix Change-Id: If477b0bb753c1a8bed2ebb440ac43f55805a0744
This commit is contained in:
parent
d93ea9eb75
commit
89a1f7c077
|
@ -21,7 +21,6 @@ import uuid
|
||||||
|
|
||||||
from oslo_serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
from oslo_utils import encodeutils
|
from oslo_utils import encodeutils
|
||||||
import pkg_resources
|
|
||||||
import prettytable
|
import prettytable
|
||||||
import six
|
import six
|
||||||
from six.moves.urllib import parse
|
from six.moves.urllib import parse
|
||||||
|
@ -413,22 +412,6 @@ def do_action_on_many(action, resources, success_msg, error_msg):
|
||||||
raise exceptions.CommandError(error_msg)
|
raise exceptions.CommandError(error_msg)
|
||||||
|
|
||||||
|
|
||||||
def load_entry_point(ep_name, name=None):
|
|
||||||
"""Try to load the entry point ep_name that matches name."""
|
|
||||||
for ep in pkg_resources.iter_entry_points(ep_name, name=name):
|
|
||||||
try:
|
|
||||||
# FIXME(dhellmann): It would be better to use stevedore
|
|
||||||
# here, since it abstracts this difference in behavior
|
|
||||||
# between versions of setuptools, but this seemed like a
|
|
||||||
# more expedient fix.
|
|
||||||
if hasattr(ep, 'resolve') and hasattr(ep, 'require'):
|
|
||||||
return ep.resolve()
|
|
||||||
else:
|
|
||||||
return ep.load(require=False)
|
|
||||||
except (ImportError, pkg_resources.UnknownExtra, AttributeError):
|
|
||||||
continue
|
|
||||||
|
|
||||||
|
|
||||||
def is_integer_like(val):
|
def is_integer_like(val):
|
||||||
"""Returns validation of a value as an integer."""
|
"""Returns validation of a value as an integer."""
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue