diff options
author | Cat Lee Ball 🎷🐛 <cball@google.com> | 2019-03-26 17:21:03 -0700 |
---|---|---|
committer | Cat Lee Ball 🎷🐛 <cball@google.com> | 2019-03-26 17:21:03 -0700 |
commit | 0955620ab49b76c60abbcc1bea61ad05c2098361 (patch) | |
tree | 03504e75038acd58f022acb8af4d16826190c817 /boto/gs/key.py | |
parent | acd6a95ad953a4f1ac72adfc354a6c5aec74fbb0 (diff) | |
download | boto-0955620ab49b76c60abbcc1bea61ad05c2098361.tar.gz |
Replaced get_utf8_value with six.ensure_str
We replaced the old method get_utf8_value with six.ensure_str now
that it's available. ensure_str behaves more relibaly and accurately
in testing than the get_utf8_value function.
Diffstat (limited to 'boto/gs/key.py')
-rw-r--r-- | boto/gs/key.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/boto/gs/key.py b/boto/gs/key.py index b1d4189f..94563a75 100644 --- a/boto/gs/key.py +++ b/boto/gs/key.py @@ -24,7 +24,7 @@ import binascii import os import re -from boto.compat import StringIO +from boto.compat import StringIO, six from boto.exception import BotoClientError from boto.s3.key import Key as S3Key from boto.s3.keyfile import KeyFile @@ -707,7 +707,7 @@ class Key(S3Key): self.md5 = None self.base64md5 = None - fp = StringIO(get_utf8_value(s)) + fp = StringIO(six.ensure_str(s)) r = self.set_contents_from_file(fp, headers, replace, cb, num_cb, policy, md5, if_generation=if_generation) |