From a61a2997f646b92739c64672f4f4474b80321222 Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Wed, 11 Dec 2013 20:34:48 +0100 Subject: [PATCH] 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 --- keystoneclient/contrib/ec2/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keystoneclient/contrib/ec2/utils.py b/keystoneclient/contrib/ec2/utils.py index 3eaa60733..26030ee5d 100644 --- a/keystoneclient/contrib/ec2/utils.py +++ b/keystoneclient/contrib/ec2/utils.py @@ -117,7 +117,7 @@ class Ec2Signer(object): def _calc_signature_1(self, params): """Generate AWS signature version 1 string.""" 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: self.hmac.update(key) val = self._get_utf8_value(params[key])