aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Kaplan-Moss2009-04-12 19:52:06 -0500
committerJacob Kaplan-Moss2009-04-12 19:52:06 -0500
commitf20615679438f43b596d84ebf94f61fa2d54c68b (patch)
treec0bb5d50502987bc52732dd0b56a4a14dd748188
parent45a02f1af64ffa5ee5fddd8930c1507def786ee4 (diff)
downloaddjango-shorturls-f20615679438f43b596d84ebf94f61fa2d54c68b.tar.bz2
Fixed a Python 2.5ism.
-rw-r--r--.gitignore1
-rw-r--r--src/shorturls/views.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index fd54d38..fb81c73 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,7 @@
.installed.cfg
bin
develop-eggs
+dist
downloads
eggs
parts
diff --git a/src/shorturls/views.py b/src/shorturls/views.py
index d56ee1f..1737472 100644
--- a/src/shorturls/views.py
+++ b/src/shorturls/views.py
@@ -34,7 +34,7 @@ def redirect(request, prefix, tiny):
# actually returns a domain-relative URL -- into a fully qualified one.
# If we got a fully-qualified URL, sweet.
- if urlparse.urlsplit(url).scheme:
+ if urlparse.urlsplit(url)[0]:
return HttpResponsePermanentRedirect(url)
# Otherwise, we need to make a full URL by prepending a base URL.