[Pypi-checkins] r898 - trunk/pypi

martin.von.loewis python-checkins at python.org
Sat Apr 2 19:13:09 CEST 2011


Author: martin.von.loewis
Date: Sat Apr  2 19:13:09 2011
New Revision: 898

Modified:
   trunk/pypi/webui.py
Log:
Don't directly call display for single-item search
results; redirect instead.


Modified: trunk/pypi/webui.py
==============================================================================
--- trunk/pypi/webui.py	(original)
+++ trunk/pypi/webui.py	Sat Apr  2 19:13:09 2011
@@ -1527,9 +1527,7 @@
             scores[k[0]] = v[0]
 
         if len(l) == 1:
-            self.form['name'] = l[0][-1]['name']
-            self.form['version'] = l[0][-1]['version']
-            return self.display()
+            raise RedirectTemporary, "%s/%s/%s" % (self.config.url,l[0][-1]['name'],l[0][-1]['version'])
 
         # sort and pull out just the record
         l.sort()


More information about the Pypi-checkins mailing list