]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
heat : fix glanceclient deprecation warning
authorSteven Hardy <shardy@redhat.com>
Wed, 26 Sep 2012 13:51:08 +0000 (14:51 +0100)
committerSteven Hardy <shardy@redhat.com>
Wed, 26 Sep 2012 14:27:15 +0000 (15:27 +0100)
glanceclient module name changed for F18, so do
a conditional import which should import the correct
version provided one is available (tested on F17/F18)

Fixes #251

Change-Id: I095560f29a408949a7d54795fc000c094b1d63b9
Signed-off-by: Steven Hardy <shardy@redhat.com>
heat/tests/functional/util.py
heat/utils.py

index b9f6e06402c0c6484a5b71f558217c011b4bc67a..bb88ec143a221580adb64f42f4d7de251951f538 100644 (file)
@@ -33,7 +33,10 @@ from nose.plugins.attrib import attr
 from nose import with_setup
 from nose.exc import SkipTest
 
-from glance import client as glance_client
+try:
+    from glanceclient import client as glance_client
+except ImportError:
+    from glance import client as glance_client
 from novaclient.v1_1 import client as nova_client
 import heat
 from heat import utils
index 528b40dd43f6d67195b538b9cccb7e9082f124e7..bc39b6cfd058d697a5d5511178d383312ddc1267 100644 (file)
@@ -21,7 +21,10 @@ import base64
 from lxml import etree
 import re
 
-from glance import client as glance_client
+try:
+    from glanceclient import client as glance_client
+except ImportError:
+    from glance import client as glance_client
 from heat.common import exception
 
 from heat.openstack.common import log as logging