diff roundup/cgi/client.py @ 4263:bd000a1e9a57

Robustify web interface.
author Stefan Seefeld <stefan@seefeld.name>
date Fri, 09 Oct 2009 13:06:43 +0000
parents 3f6cadb98c2f
children b1e614c6759f
line wrap: on
line diff
--- a/roundup/cgi/client.py	Fri Oct 09 00:30:54 2009 +0000
+++ b/roundup/cgi/client.py	Fri Oct 09 13:06:43 2009 +0000
@@ -838,7 +838,12 @@
             raise NotFound, str(designator)
         classname, nodeid = m.group(1), m.group(2)
 
-        klass = self.db.getclass(classname)
+        try:
+            klass = self.db.getclass(classname)
+        except KeyError:
+            # The classname was not valid.
+            raise NotFound, str(designator)
+            
 
         # make sure we have the appropriate properties
         props = klass.getprops()

Roundup Issue Tracker: http://roundup-tracker.org/