cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rohit Yadav (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (CLOUDSTACK-2020) CloudMonkey requester.py can't deal with unicode dictionaries
Date Mon, 01 Sep 2014 22:56:20 GMT

     [ https://issues.apache.org/jira/browse/CLOUDSTACK-2020?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rohit Yadav closed CLOUDSTACK-2020.
-----------------------------------

really old one, not a problem

> CloudMonkey requester.py can't deal with unicode dictionaries
> -------------------------------------------------------------
>
>                 Key: CLOUDSTACK-2020
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-2020
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Cloudmonkey
>    Affects Versions: 4.1.0
>            Reporter: sebastien goasguen
>            Assignee: Rohit Yadav
>             Fix For: 4.2.0
>
>
> Rohit,
> I am using the requester.py from cloudmonkey.
> I noticed that passing a dictionary with unicode causes problems.
> I changed it to:
> ----
>   request.sort(key=lambda x: x[0].lower())
>     request_url = "&".join(["=".join([r[0], urllib.quote_plus(str(r[1]))])
>                            for r in request])
>     hashStr = "&".join(["=".join([r[0].lower(),
>                        str.lower(urllib.quote_plus(str(r[1]))).replace("+",
>                        "%20")]) for r in request])
> ---
> notice the x[0].lower() instead of str.lower(x[0])
> and the r[0].lower()
> Is there a reason you used str. ?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message