diff options
| author | jvoisin | 2011-08-03 13:48:09 +0200 |
|---|---|---|
| committer | jvoisin | 2011-08-03 13:48:09 +0200 |
| commit | 73e80a3859da461ca363cde6c4ab050e53159362 (patch) | |
| tree | 1b91f7edcee5245a90990fd226a07caef2c572a4 /lib/office.py | |
| parent | e4223e2054d9f9e493db71ac07cf08fd73ff433d (diff) | |
Now, the MAT should run perfectly on Tails !
Diffstat (limited to 'lib/office.py')
| -rw-r--r-- | lib/office.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/office.py b/lib/office.py index ba12295..e21805a 100644 --- a/lib/office.py +++ b/lib/office.py | |||
| @@ -5,9 +5,7 @@ | |||
| 5 | import os | 5 | import os |
| 6 | import logging | 6 | import logging |
| 7 | import zipfile | 7 | import zipfile |
| 8 | import re | ||
| 9 | import fileinput | 8 | import fileinput |
| 10 | from xml.etree import ElementTree | ||
| 11 | 9 | ||
| 12 | try: | 10 | try: |
| 13 | import cairo | 11 | import cairo |
| @@ -36,10 +34,7 @@ class OpenDocumentStripper(archive.GenericArchiveStripper): | |||
| 36 | try: | 34 | try: |
| 37 | content = zipin.read('meta.xml') | 35 | content = zipin.read('meta.xml') |
| 38 | zipin.close() | 36 | zipin.close() |
| 39 | tree = ElementTree.fromstring(content) | 37 | metadata[self.filename] = 'harful meta' |
| 40 | for node in tree.iter(): | ||
| 41 | key = re.sub('{.*}', '', node.tag) | ||
| 42 | metadata[key] = node.text | ||
| 43 | except KeyError: # no meta.xml file found | 38 | except KeyError: # no meta.xml file found |
| 44 | logging.debug('%s has no opendocument metadata' % self.filename) | 39 | logging.debug('%s has no opendocument metadata' % self.filename) |
| 45 | return metadata | 40 | return metadata |
