Remove the 'cmp' keyword from a call to 'sort()'
This keyword does not exist in Python 3, and 'key' should be used instead. Change-Id: I0f92a1e3d389b491bf138c215e11e68fddc15477
This commit is contained in:
@@ -117,7 +117,7 @@ class Ec2Signer(object):
|
|||||||
def _calc_signature_1(self, params):
|
def _calc_signature_1(self, params):
|
||||||
"""Generate AWS signature version 1 string."""
|
"""Generate AWS signature version 1 string."""
|
||||||
keys = list(params)
|
keys = list(params)
|
||||||
keys.sort(cmp=lambda x, y: cmp(x.lower(), y.lower()))
|
keys.sort(key=six.text_type.lower)
|
||||||
for key in keys:
|
for key in keys:
|
||||||
self.hmac.update(key)
|
self.hmac.update(key)
|
||||||
val = self._get_utf8_value(params[key])
|
val = self._get_utf8_value(params[key])
|
||||||
|
Reference in New Issue
Block a user