equal
deleted
inserted
replaced
85 (_, file_type) = os.path.splitext(filename) |
85 (_, file_type) = os.path.splitext(filename) |
86 file_type = file_type.lower() |
86 file_type = file_type.lower() |
87 if COMMENT_SYMBOLS.has_key(file_type): |
87 if COMMENT_SYMBOLS.has_key(file_type): |
88 for i in range(len(COMMENT_SYMBOLS[file_type])): |
88 for i in range(len(COMMENT_SYMBOLS[file_type])): |
89 comment = comment.replace(COMMENT_SYMBOLS[file_type][i], "") |
89 comment = comment.replace(COMMENT_SYMBOLS[file_type][i], "") |
90 try: |
90 |
91 doc.commentLog.xml_append_fragment(comment) |
91 doc.commentLog.xml_append_fragment(comment) |
92 # Add a generic file attribute to the comment to label which file it comes from |
92 # Add a generic file attribute to the comment to label which file it comes from |
93 doc.commentLog.xml_children[-1].xml_set_attribute(u'file', unicode(filename)) |
93 doc.commentLog.xml_children[-1].xml_set_attribute(u'file', unicode(filename)) |
94 except Exception: |
|
95 _logger.warning("A comment in '%s' is not valid XML." % filename) |
|
96 |
94 |
97 #print doc.xml() |
95 #print doc.xml() |
98 return doc |
96 return doc |
99 |
97 |