Clean imports in code
This patch set modifies lines which are importing objects instead of modules. As per openstack import guide lines, user should import modules in a file not objects. http://docs.openstack.org/developer/hacking/#imports Change-Id: I0c6036d18065e83799056b9184efa6f18c1b6c19
This commit is contained in:
parent
ccaf4d69bc
commit
71662326b8
@ -16,7 +16,7 @@ from cliff import lister
|
||||
from cliff import show
|
||||
from oslo_log import log
|
||||
|
||||
from vitrageclient.common.exc import CommandException
|
||||
from vitrageclient.common import exc
|
||||
from vitrageclient.common import utils
|
||||
|
||||
LOG = log.getLogger(__name__)
|
||||
@ -37,7 +37,7 @@ class TemplateValidate(show.ShowOne):
|
||||
def take_action(self, parsed_args):
|
||||
|
||||
if not parsed_args.path:
|
||||
raise CommandException(message='No path requested, add --path')
|
||||
raise exc.CommandException(message='No path requested, add --path')
|
||||
|
||||
if parsed_args.path:
|
||||
result = self.app.client.template.validate(path=parsed_args.path)
|
||||
|
@ -11,7 +11,7 @@
|
||||
# under the License.
|
||||
|
||||
from cliff import show
|
||||
from vitrageclient.common.exc import CommandException
|
||||
from vitrageclient.common import exc
|
||||
|
||||
|
||||
# noinspection PyAbstractClass
|
||||
@ -47,7 +47,7 @@ class TopologyShow(show.ShowOne):
|
||||
root = parsed_args.root
|
||||
|
||||
if graph_type == 'graph' and limit is not None and root is None:
|
||||
raise CommandException(
|
||||
raise exc.CommandException(
|
||||
message="Graph-type 'graph' requires a 'root' with 'limit'.")
|
||||
|
||||
topology = self.app.client.topology.get(limit=limit,
|
||||
|
@ -13,7 +13,7 @@
|
||||
# under the License.
|
||||
import os
|
||||
from oslo_log import log
|
||||
from vitrageclient.common.exc import CommandException
|
||||
from vitrageclient.common import exc
|
||||
from vitrageclient.common import yaml_utils
|
||||
|
||||
|
||||
@ -74,4 +74,4 @@ class Template(object):
|
||||
except ValueError as e:
|
||||
message = 'Could not load template file: %s. Reason: %s' \
|
||||
% (path, e.message)
|
||||
raise CommandException(message=message)
|
||||
raise exc.CommandException(message=message)
|
||||
|
Loading…
x
Reference in New Issue
Block a user