Repository: cloudstack-cloudmonkey Updated Branches: refs/heads/master ce308dccd -> 24faf56d5
requester: don't send out empty key/value args 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/75f617c6 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/tree/75f617c6 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/diff/75f617c6 Branch: refs/heads/master Commit: 75f617c6652ed6984d03badc9f1bcad32f7ba175 Parents: ce308dc Author: Rohit Yadav <rohit.ya...@shapeblue.com> Authored: Tue Nov 4 18:30:27 2014 +0530 Committer: Rohit Yadav <rohit.ya...@shapeblue.com> Committed: Tue Nov 4 18:30:27 2014 +0530 ---------------------------------------------------------------------- cloudmonkey/requester.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/blob/75f617c6/cloudmonkey/requester.py ---------------------------------------------------------------------- diff --git a/cloudmonkey/requester.py b/cloudmonkey/requester.py index 3d8e35e..627063e 100644 --- a/cloudmonkey/requester.py +++ b/cloudmonkey/requester.py @@ -171,10 +171,13 @@ def make_request(command, args, logger, url, credentials, expires, expirationtime = datetime.utcnow() + timedelta(seconds=int(expires)) args["expires"] = expirationtime.strftime('%Y-%m-%dT%H:%M:%S+0000') - for key, value in args.iteritems(): + for key in args.keys(): + value = args[key] if isinstance(value, unicode): value = value.encode("utf-8") args[key] = value + if not key or not value: + args.pop(key) # try to use the apikey/secretkey method by default # followed by trying to check if we're using integration port