From 3050adf16cf7c8234c7819d6edffb47bccda7576 Mon Sep 17 00:00:00 2001 From: Nguyen Hung Phuong Date: Thu, 15 Sep 2016 13:50:35 +0700 Subject: [PATCH] Clean imports in code In some part in the code we import objects. In the Openstack style guidelines they recommend to import only modules. http://docs.openstack.org/developer/hacking/#imports Change-Id: I251a19736cf24a7ace40ea10371452f36c0b49b2 --- mistraldashboard/exceptions.py | 4 ++-- mistraldashboard/workflows/views.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mistraldashboard/exceptions.py b/mistraldashboard/exceptions.py index e69a365..0b5d457 100644 --- a/mistraldashboard/exceptions.py +++ b/mistraldashboard/exceptions.py @@ -12,9 +12,9 @@ # License for the specific language governing permissions and limitations # under the License. -from mistralclient.api.base import APIException +from mistralclient.api import base from openstack_dashboard import exceptions NOT_FOUND = exceptions.NOT_FOUND -RECOVERABLE = exceptions.RECOVERABLE + (APIException,) +RECOVERABLE = exceptions.RECOVERABLE + (base.APIException,) UNAUTHORIZED = exceptions.UNAUTHORIZED diff --git a/mistraldashboard/workflows/views.py b/mistraldashboard/workflows/views.py index 5c72333..ea9b0c1 100644 --- a/mistraldashboard/workflows/views.py +++ b/mistraldashboard/workflows/views.py @@ -25,11 +25,11 @@ from horizon import tables from mistraldashboard import api from mistraldashboard.workflows import forms as mistral_forms -from mistraldashboard.workflows.tables import WorkflowsTable +from mistraldashboard.workflows import tables as workflows_tables class IndexView(tables.DataTableView): - table_class = WorkflowsTable + table_class = workflows_tables.WorkflowsTable template_name = 'mistral/workflows/index.html' def get_data(self):