Code

Robustify web interface.
authorstefan <stefan@57a73879-2fb5-44c3-a270-3262357dd7e2>
Fri, 9 Oct 2009 13:06:43 +0000 (13:06 +0000)
committerstefan <stefan@57a73879-2fb5-44c3-a270-3262357dd7e2>
Fri, 9 Oct 2009 13:06:43 +0000 (13:06 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4367 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/cgi/client.py

index 0407abdbecc60fb98d09170305c4ad21606c50da..13db91ceb46dd4634b0a4b3022e6727dad28f823 100644 (file)
@@ -838,7 +838,12 @@ class Client:
             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()