Merge lp:~vishvananda/nova/lp848643 into lp:~hudson-openstack/nova/milestone-proposed

Proposed by Vish Ishaya
Status: Merged
Approved by: Thierry Carrez
Approved revision: 1542
Merged at revision: 1199
Proposed branch: lp:~vishvananda/nova/lp848643
Merge into: lp:~hudson-openstack/nova/milestone-proposed
Diff against target: 12 lines (+1/-1)
1 file modified
nova/api/ec2/ec2utils.py (+1/-1)
To merge this branch: bzr merge lp:~vishvananda/nova/lp848643
Reviewer Review Type Date Requested Status
Thierry Carrez Approve
Todd Willey (community) Approve
Sandy Walsh (community) Approve
Review via email: mp+76450@code.launchpad.net

Description of the change

Fix keys in ec2 conversion to make sure not to use unicode.

To post a comment you must log in.
Revision history for this message
Sandy Walsh (sandy-walsh) wrote :

Isn't parts[0].encode("ascii") the correct way to ensure this?

review: Needs Information
Revision history for this message
Sandy Walsh (sandy-walsh) wrote :

Vishy ensures me that they're all ascii, just utf-8 encoded.

Otherwise we'd have to do this: http://paste.openstack.org/show/2497/

So, lgtm.

review: Approve
Revision history for this message
Todd Willey (xtoddx) wrote :

lgtm

review: Approve
Revision history for this message
Thierry Carrez (ttx) wrote :

In trunk now

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nova/api/ec2/ec2utils.py'
2--- nova/api/ec2/ec2utils.py 2011-07-23 07:55:25 +0000
3+++ nova/api/ec2/ec2utils.py 2011-09-21 16:41:44 +0000
4@@ -116,7 +116,7 @@
5 args = {}
6 for key, value in items:
7 parts = key.split(".")
8- key = camelcase_to_underscore(parts[0])
9+ key = str(camelcase_to_underscore(parts[0]))
10 if isinstance(value, str) or isinstance(value, unicode):
11 # NOTE(vish): Automatically convert strings back
12 # into their respective values

Subscribers

People subscribed via source and target branches