Fix the final boundary in resumable multipart media uploads.
Reviewed in http://codereview.appspot.com/5450107/.
diff --git a/oauth2client/client.py b/oauth2client/client.py
index 3440c23..07df411 100644
--- a/oauth2client/client.py
+++ b/oauth2client/client.py
@@ -754,6 +754,8 @@
def _urlsafe_b64decode(b64string):
+ # Guard against unicode strings, which base64 can't handle.
+ b64string = b64string.encode('ascii')
padded = b64string + '=' * (4 - len(b64string) % 4)
return base64.urlsafe_b64decode(padded)