summaryrefslogtreecommitdiff
path: root/django/utils/http.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2012-02-16 01:10:21 +0000
committerAlex Gaynor <alex.gaynor@gmail.com>2012-02-16 01:10:21 +0000
commitb9b3e9f0efe3fe9d5d976533ff2f13359825f5da (patch)
tree20fe23f94dcb16de0e26e3ec97e256f63480372b /django/utils/http.py
parent6072e108e2738dbde7c2ad976a45745551859a20 (diff)
Use Python's changed comparisons, which makes this a bit more readable.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17526 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils/http.py')
-rw-r--r--django/utils/http.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/http.py b/django/utils/http.py
index 1431f47246..d343a375c0 100644
--- a/django/utils/http.py
+++ b/django/utils/http.py
@@ -171,7 +171,7 @@ def int_to_base36(i):
"""
digits = "0123456789abcdefghijklmnopqrstuvwxyz"
factor = 0
- if (i < 0) or (i > sys.maxint):
+ if not 0 <= i <= sys.maxint:
raise ValueError("Base36 conversion input too large or incorrect type.")
# Find starting factor
while True: