[Python-checkins] r54571 - tracker/importer/sfxmlhandlers.py
erik.forsberg
python-checkins at python.org
Sun Mar 25 17:51:53 CEST 2007
Author: erik.forsberg
Date: Sun Mar 25 17:51:52 2007
New Revision: 54571
Modified:
tracker/importer/sfxmlhandlers.py
Log:
Delete comment headers from sf. Resolves
http://psf.upfronthosting.co.za/roundup/meta/issue91.
Modified: tracker/importer/sfxmlhandlers.py
==============================================================================
--- tracker/importer/sfxmlhandlers.py (original)
+++ tracker/importer/sfxmlhandlers.py Sun Mar 25 17:51:52 2007
@@ -178,6 +178,11 @@
msg_filename = self.db.filename(self.db.msg.classname,
msg_nodeid, create=1)
ensureParentsExist(msg_filename)
+
+ mo = re.search('^Logged In: (YES |NO )\nuser_id=[0-9]+\nOriginator: (YES|NO)\n', content, re.MULTILINE)
+ if mo:
+ content = content[mo.end():]
+
open(msg_filename, 'w').write(content.encode('utf-8'))
return msg_nodeid
More information about the Python-checkins
mailing list