summaryrefslogtreecommitdiff
path: root/django/utils/translation/trans_real.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/utils/translation/trans_real.py')
-rw-r--r--django/utils/translation/trans_real.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/translation/trans_real.py b/django/utils/translation/trans_real.py
index 017b99a8ca..f732cd931e 100644
--- a/django/utils/translation/trans_real.py
+++ b/django/utils/translation/trans_real.py
@@ -502,7 +502,7 @@ def parse_accept_lang_header(lang_string):
return []
priority = priority and float(priority) or 1.0
result.append((lang, priority))
- result.sort(lambda x, y: -cmp(x[1], y[1]))
+ result.sort(key=lambda k: k[1], reverse=True)
return result
# get_date_formats and get_partial_date_formats aren't used anymore by Django