diff options
| author | jvoisin | 2011-12-23 02:50:35 +0100 |
|---|---|---|
| committer | jvoisin | 2011-12-23 02:50:35 +0100 |
| commit | 375bf34e0fbd2202c1c4a177144f78f548826870 (patch) | |
| tree | b2a7b5e499692b87fb6868e9f85dc003f2846fdf | |
| parent | f10ead7e6c478a03f476d3d53b29af9a883bb07d (diff) | |
Saving files before commit is a good practise
| -rw-r--r-- | mat/office.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/mat/office.py b/mat/office.py index 3e70be4..331d9bf 100644 --- a/mat/office.py +++ b/mat/office.py | |||
| @@ -8,7 +8,6 @@ import zipfile | |||
| 8 | import fileinput | 8 | import fileinput |
| 9 | import subprocess | 9 | import subprocess |
| 10 | import xml.dom.minidom as minidom | 10 | import xml.dom.minidom as minidom |
| 11 | import StringIO | ||
| 12 | 11 | ||
| 13 | try: | 12 | try: |
| 14 | import cairo | 13 | import cairo |
| @@ -38,10 +37,10 @@ class OpenDocumentStripper(archive.GenericArchiveStripper): | |||
| 38 | dom1 = minidom.parseString(content) | 37 | dom1 = minidom.parseString(content) |
| 39 | a = dom1.getElementsByTagName('office:meta') | 38 | a = dom1.getElementsByTagName('office:meta') |
| 40 | for i in a[0].childNodes: | 39 | for i in a[0].childNodes: |
| 41 | msg = i.tagName + ' : ' | 40 | msg = '' |
| 42 | for j in i.childNodes: | 41 | for j in i.childNodes: |
| 43 | msg += j.data | 42 | msg += j.data |
| 44 | print(msg) | 43 | metadata[i.tagName] = msg |
| 45 | zipin.close() | 44 | zipin.close() |
| 46 | except KeyError: # no meta.xml file found | 45 | except KeyError: # no meta.xml file found |
| 47 | logging.debug('%s has no opendocument metadata' % self.filename) | 46 | logging.debug('%s has no opendocument metadata' % self.filename) |
