[Pypi-checkins] r871 - trunk/pypi

martin.von.loewis python-checkins at python.org
Tue Sep 21 05:01:33 CEST 2010


Author: martin.von.loewis
Date: Tue Sep 21 05:01:32 2010
New Revision: 871

Modified:
   trunk/pypi/webui.py
Log:
Reject empty strings as content or filetype.
Fixes #3072282.


Modified: trunk/pypi/webui.py
==============================================================================
--- trunk/pypi/webui.py	(original)
+++ trunk/pypi/webui.py	Tue Sep 21 05:01:32 2010
@@ -2257,7 +2257,7 @@
             filetype = self.form['filetype']
             if filetype == 'sdist':
                 self.form['pyversion'] = 'source'
-        if content is None or filetype is None:
+        if not content or not filetype:
             raise FormError, 'Both content and filetype are required'
 
         md5_digest = self.form['md5_digest']


More information about the Pypi-checkins mailing list