backend.py: Make FlatFileRecord._format include the trailing newline.
[chopwood] / cgi.py
diff --git a/cgi.py b/cgi.py
index cfa26f7..69b9038 100644 (file)
--- a/cgi.py
+++ b/cgi.py
@@ -419,7 +419,8 @@ def cgiparse():
     else:
       PARAM.append((k, v))
       if k in seen:
-        del PARAMDICT[k]
+        try: del PARAMDICT[k]
+        except KeyError: pass
       else:
         PARAMDICT[k] = v
         seen.add(k)