summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorAnthony Young <sleepsonthefloor@gmail.com>2011-08-01 18:56:16 -0700
committerAnthony Young <sleepsonthefloor@gmail.com>2011-08-01 18:56:16 -0700
commit0e5b2b0bfb7f6b0af7f2c962a963830a8691410e (patch)
tree17c19d0fae1d57d297f6f81f5560f73bf4d6b675 /nova/api
parente2ce48eb3ffde56fa8d74b397682814ad278ae63 (diff)
avoid explicit type checking, per brian waldon's comment
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/create_instance_helper.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/nova/api/openstack/create_instance_helper.py b/nova/api/openstack/create_instance_helper.py
index 234c16bcc..b414b2173 100644
--- a/nova/api/openstack/create_instance_helper.py
+++ b/nova/api/openstack/create_instance_helper.py
@@ -90,8 +90,7 @@ class CreateInstanceHelper(object):
# If the image href was generated by nova api, strip image_href
# down to an id and use the default glance connection params
- if isinstance(image_href, basestring) and\
- image_href.startswith(req.application_url):
+ if str(image_href).startswith(req.application_url):
image_href = image_href.split('/').pop()
try:
image_service, image_id = nova.image.get_image_service(image_href)