Remove conditional import

Commit 7f07e9788e adds conditional
import of exception module of magnumclient. This is not needed
as the requirements explicitly specifies that we require
python-magnumclient>=2.0.0.

Change-Id: Id86d969927e8fb5ee1b60186990dcbd1ea33f9bb
This commit is contained in:
Rabi Mishra 2016-04-16 10:16:32 +05:30
parent a2d829f312
commit 84da9e5409
2 changed files with 2 additions and 12 deletions

View File

@ -11,18 +11,13 @@
# License for the specific language governing permissions and limitations
# under the License.
from magnumclient.common.apiclient import exceptions as mc_exc
from magnumclient.v1 import client as magnum_client
from heat.common import exception
from heat.engine.clients import client_plugin
from heat.engine import constraints
try:
from magnumclient.common.apiclient import exceptions as mc_exc
except ImportError:
# NOTE (duvarenkov): For magnumclient versions before 2.0.0.
from magnumclient.openstack.common.apiclient import exceptions as mc_exc
CLIENT_NAME = 'magnum'

View File

@ -12,6 +12,7 @@
# under the License.
import copy
from magnumclient.common.apiclient import exceptions as mc_exc
import mock
from oslo_config import cfg
import six
@ -26,12 +27,6 @@ from heat.engine import template
from heat.tests import common
from heat.tests import utils
try:
from magnumclient.common.apiclient import exceptions as mc_exc
except ImportError:
# NOTE (duvarenkov): For magnumclient versions before 2.0.0.
from magnumclient.openstack.common.apiclient import exceptions as mc_exc
magnum_template = '''
heat_template_version: 2015-04-30