[Pypi-checkins] r918 - trunk/pypi

richard python-checkins at python.org
Tue Apr 12 08:21:29 CEST 2011


Author: richard
Date: Tue Apr 12 08:21:29 2011
New Revision: 918

Modified:
   trunk/pypi/webui.py
Log:
handle the q= bit

Modified: trunk/pypi/webui.py
==============================================================================
--- trunk/pypi/webui.py	(original)
+++ trunk/pypi/webui.py	Tue Apr 12 08:21:29 2011
@@ -577,8 +577,11 @@
             s = s.split(';') # gzip;q=0.6
             if len(s) == 1:
                 result[s[0].strip()] = 1.0
+            elif s[1].startswith('q='):
+                result[s[0].strip()] = float(s[1][2:])
             else:
-                result[s[0].strip()] = float(s[1])
+                # not the correct format
+                result[s[0].strip()] = 1.0
         best_prio = 0
         best_enc = None
         for enc in supported:


More information about the Pypi-checkins mailing list