Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

boto.connection build_list_params problems with unicode #1066

Closed
matin-nayob opened this Issue · 2 comments

2 participants

@matin-nayob

Hi guys,

The build_list_params function compares items argument to type str.
This breaks down if items is of type unicode.

With things like Volume.Id returning unicode types, this makes it tricky to try and chain the various functions
(i,e. retrieve a volume id (type unicode), then get_all_volumes filtered by the unicode volume id which breaks things horribly).

It would be great if this was something that could be looked at, or if im missing something obvious just point and laugh.

Thanks for the great work!

@jamesls
Owner

@garnaat Any problems with just checking for bastring instead of str?

diff --git a/boto/connection.py b/boto/connection.py
index 080ff5e..934a703 100644
--- a/boto/connection.py
+++ b/boto/connection.py
@@ -952,7 +952,7 @@ class AWSQueryConnection(AWSAuthConnection):
         return self._mexe(http_request)

     def build_list_params(self, params, items, label):
-        if isinstance(items, str):
+        if isinstance(items, basestring):
@jamesls jamesls referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@jamesls jamesls referenced this issue from a commit in jamesls/boto
@jamesls jamesls Support unicode for building single list params
As mentioned in #1066, some of the responses return
unicode, and it makes it tricky to feed the return
values into subsequent calls.

The integration/unittests all pass for me
d5e008d
@jamesls
Owner

Should be fixed now.

@jamesls jamesls closed this
@msabramo msabramo referenced this issue from a commit in msabramo/boto
@jamesls jamesls Support unicode for building single list params
As mentioned in #1066, some of the responses return
unicode, and it makes it tricky to feed the return
values into subsequent calls.

The integration/unittests all pass for me
99f0068
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.