From e4a82d78d98b40b7a6008f77a246eab70b12f7c7 Mon Sep 17 00:00:00 2001 From: Aaron Bell Date: Tue, 1 Sep 2015 21:59:03 -0400 Subject: [PATCH] removing stringification of every value in the image dict --- salt/cloud/clouds/digital_ocean_v2.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/salt/cloud/clouds/digital_ocean_v2.py b/salt/cloud/clouds/digital_ocean_v2.py index 7b1d6fda48..f62609575a 100644 --- a/salt/cloud/clouds/digital_ocean_v2.py +++ b/salt/cloud/clouds/digital_ocean_v2.py @@ -117,7 +117,7 @@ def avail_images(call=None): for image in items['images']: ret[image['id']] = {} for item in image.keys(): - ret[image['id']][item] = str(image[item]) + ret[image['id']][item] = image[item] page += 1 try: @@ -224,12 +224,13 @@ def get_image(vm_): Return the image object to use ''' images = avail_images() - vm_image = str(config.get_cloud_config_value( + vm_image = config.get_cloud_config_value( 'image', vm_, __opts__, search_global=False - )) + ) for image in images: + log.info(images[image]) if vm_image in (images[image]['name'], images[image]['slug'], images[image]['id']): - if images[image]['slug'] != 'None': + if images[image]['slug'] is not None: return images[image]['slug'] return int(images[image]['id']) raise SaltCloudNotFound(