summaryrefslogtreecommitdiff
path: root/boto/auth.py
diff options
context:
space:
mode:
Diffstat (limited to 'boto/auth.py')
-rw-r--r--boto/auth.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/boto/auth.py b/boto/auth.py
index 6d431461..6012962a 100644
--- a/boto/auth.py
+++ b/boto/auth.py
@@ -41,7 +41,7 @@ import sys
import time
import posixpath
-from boto.compat import urllib
+from boto.compat import urllib, encodebytes
from boto.auth_handler import AuthHandler
from boto.exception import BotoClientError
@@ -89,7 +89,7 @@ class HmacKeys(object):
def sign_string(self, string_to_sign):
new_hmac = self._get_hmac()
new_hmac.update(string_to_sign.encode('utf-8'))
- return base64.encodestring(new_hmac.digest()).decode('utf-8').strip()
+ return encodebytes(new_hmac.digest()).decode('utf-8').strip()
def __getstate__(self):
pickled_dict = copy.copy(self.__dict__)
@@ -99,7 +99,7 @@ class HmacKeys(object):
def __setstate__(self, dct):
self.__dict__ = dct
- self.update_provider(self._provider.encode('utf-8'))
+ self.update_provider(self._provider)
class AnonAuthHandler(AuthHandler, HmacKeys):