Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
Fix converting bytearray to string
Browse files Browse the repository at this point in the history
Fixes #37.
  • Loading branch information
mitya57 committed Jan 2, 2016
1 parent 6f4026e commit 6f3413b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion samples/apps/marketplace_sample/gdata/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ def GetAuthHeader(self, http_method, http_url):
timestamp = int(math.floor(time.time()))
nonce = '%lu' % random.randrange(1, 2**64)
data = '%s %s %d %s' % (http_method, str(http_url), timestamp, nonce)
sig = encodestring(self.rsa_key.hashAndSign(data).tostring()).rstrip()
sig = encodestring(str(self.rsa_key.hashAndSign(data))).rstrip()
header = {'Authorization': '%s"%s" data="%s" sig="%s" sigalg="rsa-sha1"' %
(AUTHSUB_AUTH_LABEL, self.token_string, data, sig)}
return header
Expand Down
2 changes: 1 addition & 1 deletion src/gdata/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ def GetAuthHeader(self, http_method, http_url):
timestamp = int(math.floor(time.time()))
nonce = '%lu' % random.randrange(1, 2**64)
data = '%s %s %d %s' % (http_method, str(http_url), timestamp, nonce)
sig = encodestring(self.rsa_key.hashAndSign(data).tostring()).rstrip()
sig = encodestring(str(self.rsa_key.hashAndSign(data))).rstrip()
header = {'Authorization': '%s"%s" data="%s" sig="%s" sigalg="rsa-sha1"' %
(AUTHSUB_AUTH_LABEL, self.token_string, data, sig)}
return header
Expand Down

0 comments on commit 6f3413b

Please sign in to comment.