Fix the final boundary in resumable multipart media uploads.
Reviewed in http://codereview.appspot.com/5450107/.
diff --git a/oauth2client/crypt.py b/oauth2client/crypt.py
index 523c921..323345a 100644
--- a/oauth2client/crypt.py
+++ b/oauth2client/crypt.py
@@ -137,6 +137,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)