You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-commits@quetz.apache.org by gr...@apache.org on 2006/10/29 08:31:40 UTC

svn commit: r468841 - /httpd/mod_python/trunk/lib/python/mod_python/util.py

Author: grahamd
Date: Sun Oct 29 00:31:39 2006
New Revision: 468841

URL: http://svn.apache.org/viewvc?view=rev&rev=468841
Log:
(MODPYTHON-93) The __delitem__() wasn't throwing a KeyError exception when
the field name didn't exist.


Modified:
    httpd/mod_python/trunk/lib/python/mod_python/util.py

Modified: httpd/mod_python/trunk/lib/python/mod_python/util.py
URL: http://svn.apache.org/viewvc/httpd/mod_python/trunk/lib/python/mod_python/util.py?view=diff&rev=468841&r1=468840&r2=468841
==============================================================================
--- httpd/mod_python/trunk/lib/python/mod_python/util.py (original)
+++ httpd/mod_python/trunk/lib/python/mod_python/util.py Sun Oct 29 00:31:39 2006
@@ -447,9 +447,9 @@
 
     def __delitem__(self, key):
         table = self.list.table()
-        if key in table:
-            for value in table[key]:
-                self.list.remove(value)
+        values = table[key]
+        for value in values:
+            self.list.remove(value)
 
     def clear(self):
         self.list = FieldList()