diff options
Diffstat (limited to 'lib/mat.py')
| -rw-r--r-- | lib/mat.py | 7 |
1 files changed, 4 insertions, 3 deletions
| @@ -43,7 +43,8 @@ try: | |||
| 43 | STRIPPERS['application/x-pdf'] = office.PdfStripper | 43 | STRIPPERS['application/x-pdf'] = office.PdfStripper |
| 44 | STRIPPERS['application/pdf'] = office.PdfStripper | 44 | STRIPPERS['application/pdf'] = office.PdfStripper |
| 45 | except ImportError: | 45 | except ImportError: |
| 46 | print('Unable to import python-poppler and/or python-cairo: no pdf support') | 46 | print('Unable to import python-poppler and/or python-cairo: no pdf \ |
| 47 | support') | ||
| 47 | 48 | ||
| 48 | try: | 49 | try: |
| 49 | import mutagen | 50 | import mutagen |
| @@ -62,7 +63,7 @@ class XMLParser(xml.sax.handler.ContentHandler): | |||
| 62 | self.dict = {} | 63 | self.dict = {} |
| 63 | self.list = [] | 64 | self.list = [] |
| 64 | self.content, self.key = '', '' | 65 | self.content, self.key = '', '' |
| 65 | self.between= False | 66 | self.between = False |
| 66 | 67 | ||
| 67 | def startElement(self, name, attrs): | 68 | def startElement(self, name, attrs): |
| 68 | ''' | 69 | ''' |
| @@ -142,7 +143,7 @@ def create_class_file(name, backup, add2archive): | |||
| 142 | 143 | ||
| 143 | mime = parser.mime_type | 144 | mime = parser.mime_type |
| 144 | 145 | ||
| 145 | if mime == 'application/zip': # some formats are zipped stuff | 146 | if mime == 'application/zip': # some formats are zipped stuff |
| 146 | mime = mimetypes.guess_type(name)[0] | 147 | mime = mimetypes.guess_type(name)[0] |
| 147 | 148 | ||
| 148 | if mime.startswith('application/vnd.oasis.opendocument'): | 149 | if mime.startswith('application/vnd.oasis.opendocument'): |
