Repository: cloudstack-cloudmonkey
Updated Branches:
  refs/heads/master d62f6b4c6 -> 9662e6bcc


request: fix ValueError when expiry is not set or set as blank/none

Signed-off-by: Rohit Yadav <rohit.ya...@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/commit/4c80be86
Tree: 
http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/tree/4c80be86
Diff: 
http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/diff/4c80be86

Branch: refs/heads/master
Commit: 4c80be86b535955cb092e1303f8e12e1aeb90d89
Parents: d62f6b4
Author: Rohit Yadav <rohit.ya...@shapeblue.com>
Authored: Fri Sep 5 19:38:49 2014 +0200
Committer: Rohit Yadav <rohit.ya...@shapeblue.com>
Committed: Fri Sep 5 19:38:49 2014 +0200

----------------------------------------------------------------------
 cloudmonkey/requester.py | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/blob/4c80be86/cloudmonkey/requester.py
----------------------------------------------------------------------
diff --git a/cloudmonkey/requester.py b/cloudmonkey/requester.py
index 5a9b7ec..730b825 100644
--- a/cloudmonkey/requester.py
+++ b/cloudmonkey/requester.py
@@ -153,6 +153,8 @@ def make_request(command, args, logger, url,
     args["command"] = command
     args["response"] = "json"
     args["signatureversion"] = "3"
+    if expires == "" or expires == None:
+        expires = 600
     expirationtime = datetime.utcnow() + timedelta(seconds=int(expires))
     args["expires"] = expirationtime.strftime('%Y-%m-%dT%H:%M:%S+0000')
 

Reply via email to