Skip to content

Commit

Permalink
Don't encode python3 strings into bytes literal.
Browse files Browse the repository at this point in the history
  • Loading branch information
kurin committed Feb 22, 2013
1 parent fe97740 commit dc00129
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion boto/s3/bucket.py
Expand Up @@ -315,7 +315,8 @@ def _get_all(self, element_map, initial_query_string='',
k = k.replace('_', '-')
if k == 'maxkeys':
k = 'max-keys'
if isinstance(v, unicode):
if isinstance(v, unicode) and hasattr(v, 'decode'):
# for python2 strings only
v = v.encode('utf-8')
if v is not None and v != '':
l.append('%s=%s' % (urllib.quote(k), urllib.quote(str(v))))
Expand Down

0 comments on commit dc00129

Please sign in to comment.