summaryrefslogtreecommitdiffstats
path: root/nova/compute
diff options
context:
space:
mode:
Diffstat (limited to 'nova/compute')
-rw-r--r--nova/compute/api.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py
index 8bdf712a0..d79371e94 100644
--- a/nova/compute/api.py
+++ b/nova/compute/api.py
@@ -125,7 +125,10 @@ class API(base.Base):
raise quota.QuotaError(msg, "MetadataLimitExceeded")
image = self.image_service.show(context, image_id)
- os_type = image['properties'].get('os_type', 'linux')
+
+ os_type = None
+ if 'properties' in image and 'os_type' in image['properties']:
+ os_type = image['properties']['os_type']
if kernel_id is None:
kernel_id = image.get('kernel_id', None)