diff --git a/contrib/setup-tools/solum-app-setup.py b/contrib/setup-tools/solum-app-setup.py index 8217942..cf13941 100644 --- a/contrib/setup-tools/solum-app-setup.py +++ b/contrib/setup-tools/solum-app-setup.py @@ -32,7 +32,7 @@ import six import yaml from solumclient import client as solum_client -from solumclient.openstack.common import cliutils +from solumclient.common import cliutils SOLUM_API_VERSION = '1' diff --git a/solumclient/common/cli_utils.py b/solumclient/common/cli_utils.py index ce854fc..209b70b 100644 --- a/solumclient/common/cli_utils.py +++ b/solumclient/common/cli_utils.py @@ -19,8 +19,8 @@ import os from oslo_log import log as logging from solumclient import client as solum_client +from solumclient.common import cliutils from solumclient.common import exc -from solumclient.openstack.common import cliutils class CommandsBase(object): diff --git a/solumclient/openstack/common/cliutils.py b/solumclient/common/cliutils.py similarity index 97% rename from solumclient/openstack/common/cliutils.py rename to solumclient/common/cliutils.py index 10157aa..5746ddc 100644 --- a/solumclient/openstack/common/cliutils.py +++ b/solumclient/common/cliutils.py @@ -279,18 +279,16 @@ def find_resource(manager, name_or_id, **find_args): return manager.find(**kwargs) except exceptions.NotFound: msg = _("No %(name)s with a name or " - "ID of '%(name_or_id)s' exists.") % \ - { - "name": manager.resource_class.__name__.lower(), - "name_or_id": name_or_id + "ID of '%(name_or_id)s' exists.") % { + "name": manager.resource_class.__name__.lower(), + "name_or_id": name_or_id } raise exceptions.CommandError(msg) except exceptions.NoUniqueMatch: msg = _("Multiple %(name)s matches found for " - "'%(name_or_id)s', use an ID to be more specific.") % \ - { - "name": manager.resource_class.__name__.lower(), - "name_or_id": name_or_id + "'%(name_or_id)s', use an ID to be more specific.") % { + "name": manager.resource_class.__name__.lower(), + "name_or_id": name_or_id } raise exceptions.CommandError(msg) diff --git a/tox.ini b/tox.ini index 3e2877f..3d050b6 100644 --- a/tox.ini +++ b/tox.ini @@ -38,3 +38,6 @@ show-source = True ignore = E123,E125,H803 builtins = _ exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build + +[hacking] +import_exceptions = solumclient.i18n