[Python-checkins] r76450 - tracker/instances/python-dev/extensions/search_id.py

martin.v.loewis python-checkins at python.org
Mon Nov 23 14:33:48 CET 2009


Author: martin.v.loewis
Date: Mon Nov 23 14:33:48 2009
New Revision: 76450
Log:
Catch missing search text.
Modified:
 tracker/instances/python-dev/extensions/search_id.py
Modified: tracker/instances/python-dev/extensions/search_id.py
==============================================================================
--- tracker/instances/python-dev/extensions/search_id.py	(original)
+++ tracker/instances/python-dev/extensions/search_id.py	Mon Nov 23 14:33:48 2009
@@ -4,6 +4,8 @@
 class SearchIDAction(Action):
 def handle(self):
 request = self.context['request']
+ if not request.search_text:
+ raise exceptions.FormError("Missing search text")
 split = request.search_text.split()
 if len(split) == 1:
 id = split[0]


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /