[Python-checkins] r56545 - tracker/instances/python-dev-spambayes-integration/detectors/no_texthtml.py

erik.forsberg python-checkins at python.org
Wed Jul 25 18:31:09 CEST 2007


Author: erik.forsberg
Date: Wed Jul 25 18:31:09 2007
New Revision: 56545

Modified:
   tracker/instances/python-dev-spambayes-integration/detectors/no_texthtml.py
Log:

If there's no type in newvalues, don't try to use newvalues['type']... :-)


Modified: tracker/instances/python-dev-spambayes-integration/detectors/no_texthtml.py
==============================================================================
--- tracker/instances/python-dev-spambayes-integration/detectors/no_texthtml.py	(original)
+++ tracker/instances/python-dev-spambayes-integration/detectors/no_texthtml.py	Wed Jul 25 18:31:09 2007
@@ -1,6 +1,6 @@
 
 def audit_html_files(db, cl, nodeid, newvalues):
-    if newvalues['type'] == 'text/html':
+    if newvalues.has_key('type') and newvalues['type'] == 'text/html':
         newvalues['type'] = 'text/plain'
     
 


More information about the Python-checkins mailing list