Index: trunk/tools/editor_trends/etl/enricher.py |
— | — | @@ -290,8 +290,14 @@ |
291 | 291 | return revert |
292 | 292 | |
293 | 293 | |
294 | | -def add_comment(revision_id, revision): |
| 294 | +def extract_comment_text(revision_id, revision): |
295 | 295 | comment = {} |
| 296 | + text = revision.find('comment') |
| 297 | + if text != None: |
| 298 | + if text.text == None: |
| 299 | + comment[revision_id] = '' |
| 300 | + else: |
| 301 | + comment[revision_id] = text.text.encode('utf-8') |
296 | 302 | comment[revision_id] = revision.find('comment').text |
297 | 303 | return comment |
298 | 304 | |