requester: fix AttributeError in case timeout if blank or None Signed-off-by: Rohit Yadav <[email protected]>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/commit/9662e6bc Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/tree/9662e6bc Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/diff/9662e6bc Branch: refs/heads/master Commit: 9662e6bcc940eda5fe416e11c96e850b276aaad5 Parents: 4c80be8 Author: Rohit Yadav <[email protected]> Authored: Fri Sep 5 19:39:24 2014 +0200 Committer: Rohit Yadav <[email protected]> Committed: Fri Sep 5 19:39:24 2014 +0200 ---------------------------------------------------------------------- cloudmonkey/requester.py | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/blob/9662e6bc/cloudmonkey/requester.py ---------------------------------------------------------------------- diff --git a/cloudmonkey/requester.py b/cloudmonkey/requester.py index 730b825..210b377 100644 --- a/cloudmonkey/requester.py +++ b/cloudmonkey/requester.py @@ -236,6 +236,8 @@ def monkeyrequest(command, args, isasync, asyncblock, logger, url, jobid = response[responsekey]['jobid'] command = "queryAsyncJobResult" request = {'jobid': jobid} + if timeout == "" or timeout == None: + timeout = 3600 timeout = int(timeout) pollperiod = 2 progress = 1
