diff options
author | W. Trevor King <wking@drexel.edu> | 2009-07-25 07:26:19 -0400 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-07-25 07:26:19 -0400 |
commit | 9afbe4e78f7a332401ec03008ff66faa5c11e297 (patch) | |
tree | f1bdf894bae6b619858a56de1496d28519e7c487 /interfaces/xml/be-mbox-to-xml | |
parent | 987324916401466efd01a8aeefb22c59b5f5a766 (diff) | |
download | bugseverywhere-9afbe4e78f7a332401ec03008ff66faa5c11e297.tar.gz |
Renamed Comment.From and .time_string to .author and .date respectively.
Now they conform to the
libbe.settings_object.setting_name_to_attr_name()
standard.
I fixed the references I found in
becommands/comment.py
interfaces/xml/be-mbox-to-xml
interfaces/xml/be-xml-to-mbox
but there may have been some references or files that slipped through.
Diffstat (limited to 'interfaces/xml/be-mbox-to-xml')
-rwxr-xr-x | interfaces/xml/be-mbox-to-xml | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/interfaces/xml/be-mbox-to-xml b/interfaces/xml/be-mbox-to-xml index 57de719..dc6a1c5 100755 --- a/interfaces/xml/be-mbox-to-xml +++ b/interfaces/xml/be-mbox-to-xml @@ -28,6 +28,7 @@ from libbe.encoding import get_encoding, set_IO_stream_encodings from mailbox import mbox, Message # the mailbox people really want an on-disk copy from time import asctime, gmtime import types +from xml.sax.saxutils import escape DEFAULT_ENCODING = get_encoding() set_IO_stream_encodings(DEFAULT_ENCODING) @@ -40,7 +41,7 @@ def comment_message_to_xml(message, fields=None): new_fields = {} new_fields[u'alt-id'] = message[u'message-id'] new_fields[u'in-reply-to'] = message[u'in-reply-to'] - new_fields[u'from'] = message[u'from'] + new_fields[u'author'] = message[u'from'] new_fields[u'date'] = message[u'date'] new_fields[u'content-type'] = message.get_content_type() for k,v in new_fields.items(): @@ -77,12 +78,12 @@ def comment_message_to_xml(message, fields=None): if message.is_multipart(): ret = [] alt_id = fields[u'alt-id'] - from_str = fields[u'from'] + from_str = fields[u'author'] date = fields[u'date'] for m in message.walk(): if m == message: continue - fields[u'from'] = from_str + fields[u'author'] = from_str fields[u'date'] = date if len(ret) > 0: # we've added one part already fields.pop(u'alt-id') # don't pass alt-id to other parts |