From d56518d9acd5f54a91492587dc4d0714d60c7c8b Mon Sep 17 00:00:00 2001
From: Tim Miller <tim.miller.0@gmail.com>
Date: Thu, 25 Jul 2013 14:54:21 -0700
Subject: [PATCH] Fix 'timeout' parameter of glance-image module.

The timeout parameter of glance-image was not being parsed into a
numeric type, causing the following error when specifying timeout:

    msg: Error in creating image: unsupported operand type(s) for +: 'float' and 'str'
---
 cloud/glance_image | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cloud/glance_image b/cloud/glance_image
index 3ef823d1ae3..1060ffacbaa 100644
--- a/cloud/glance_image
+++ b/cloud/glance_image
@@ -176,7 +176,7 @@ def _glance_image_create(module, params, client):
                 'copy_from':        params.get('copy_from'),
     }
     try:                
-        timeout = params.get('timeout')
+        timeout = float(params.get('timeout'))
         expire = time.time() + timeout
         image = client.images.create(**kwargs)
         if not params['copy_from']: