From 0c547422bbbd5f9ca7f0bd42b51affcb7d1e452c Mon Sep 17 00:00:00 2001 From: houming-wang Date: Fri, 25 Dec 2015 23:48:34 -0500 Subject: [PATCH] Remove references to _i18n and apiclient.exceptions Since oslo-incubator is no longer maintained[1] after 90ae25e38915cc502d9e9c52d59e8fb668a72ae1. We should cleanup the deprecated code. This patch do the following cleanup actions: 1. Use magnumclient.i18n instead of magnumclient.openstack.common._i18n. 2. Use magnumclient.exceptions instead of the deprecated magnumclient.openstack.common.apiclient.exceptions[2]. [1] http://lists.openstack.org/pipermail/openstack-dev/2015-November/ 079343.html [2] https://github.com/openstack/python-magnumclient/blob/master/ magnumclient/openstack/common/apiclient/exceptions.py#L25 Change-Id: I6fae1f84d211d661bb363e43167cdf8b6b06fd4d Partial-Bug: #1529316 --- magnumclient/common/utils.py | 4 ++-- magnumclient/shell.py | 2 +- magnumclient/tests/test_utils.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/magnumclient/common/utils.py b/magnumclient/common/utils.py index d22ddaf8..6ebd49de 100644 --- a/magnumclient/common/utils.py +++ b/magnumclient/common/utils.py @@ -17,8 +17,8 @@ import json -from magnumclient.openstack.common._i18n import _ -from magnumclient.openstack.common.apiclient import exceptions as exc +from magnumclient import exceptions as exc +from magnumclient.i18n import _ def common_filters(marker=None, limit=None, sort_key=None, sort_dir=None): diff --git a/magnumclient/shell.py b/magnumclient/shell.py index 7da226c0..34394f03 100644 --- a/magnumclient/shell.py +++ b/magnumclient/shell.py @@ -49,8 +49,8 @@ try: except ImportError: pass +from magnumclient import exceptions as exc from magnumclient.openstack.common.apiclient import auth -from magnumclient.openstack.common.apiclient import exceptions as exc from magnumclient.openstack.common import cliutils from magnumclient.v1 import client as client_v1 from magnumclient.v1 import shell as shell_v1 diff --git a/magnumclient/tests/test_utils.py b/magnumclient/tests/test_utils.py index ae9634cb..886577fa 100644 --- a/magnumclient/tests/test_utils.py +++ b/magnumclient/tests/test_utils.py @@ -18,7 +18,7 @@ import six from magnumclient.common import utils -from magnumclient.openstack.common.apiclient import exceptions as exc +from magnumclient import exceptions as exc from magnumclient.openstack.common import cliutils from magnumclient.tests import utils as test_utils