Skip to content

Commit 7bff1d0

Browse files
committed
CLOUDSTACK-2020: Make cli's requester unicode friendly
Fixed list processing that uses lambdas to use x.lower() assuming x is string, and not forced/caster str.lower(obj) Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
1 parent 51b4ee2 commit 7bff1d0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tools/cli/cloudmonkey/requester.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ def make_request(command, args, logger, host, port,
6161
args["apiKey"] = apikey
6262
args["response"] = "json"
6363
request = zip(args.keys(), args.values())
64-
request.sort(key=lambda x: str.lower(x[0]))
64+
request.sort(key=lambda x: x[0].lower())
6565

6666
request_url = "&".join(["=".join([r[0], urllib.quote_plus(str(r[1]))])
6767
for r in request])
68-
hashStr = "&".join(["=".join([str.lower(r[0]),
68+
hashStr = "&".join(["=".join([r[0].lower(),
6969
str.lower(urllib.quote_plus(str(r[1]))).replace("+",
7070
"%20")]) for r in request])
7171

0 commit comments

Comments
 (0)