From 4b4c34d561c4ba81274c861de47c9807dbe76ca8 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 5 Aug 2011 13:30:34 +0200 Subject: Cleanup, and cosmetic --- lib/images.py | 4 ++-- lib/mat.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/images.py b/lib/images.py index 9fa9999..d090015 100644 --- a/lib/images.py +++ b/lib/images.py @@ -7,7 +7,7 @@ import parser class JpegStripper(parser.GenericParser): ''' - Represents a .jpeg file + represents a jpeg file ''' def _should_remove(self, field): ''' @@ -23,7 +23,7 @@ class JpegStripper(parser.GenericParser): class PngStripper(parser.GenericParser): ''' - Represents a .png file + represents a png file ''' def _should_remove(self, field): ''' diff --git a/lib/mat.py b/lib/mat.py index 80d5c66..23255d5 100644 --- a/lib/mat.py +++ b/lib/mat.py @@ -33,8 +33,8 @@ STRIPPERS = { 'audio/mpeg': audio.MpegAudioStripper, 'image/jpeg': images.JpegStripper, 'image/png': images.PngStripper, - 'application/vnd.oasis.opendocument': office.OpenDocumentStripper, - 'application/vnd.openxmlformats-officedocument': office.OpenXmlStripper, + 'application/opendocument': office.OpenDocumentStripper, + 'application/officeopenxml': office.OpenXmlStripper, } try: @@ -146,9 +146,9 @@ def create_class_file(name, backup, add2archive): mime = mimetypes.guess_type(name)[0] if mime.startswith('application/vnd.oasis.opendocument'): - mime = 'application/vnd.oasis.opendocument' # opendocument fileformat + mime = 'application/opendocument' # opendocument fileformat elif mime.startswith('application/vnd.openxmlformats-officedocument'): - mime = 'application/vnd.openxmlformats-officedocument' + mime = 'application/officeopenxml' # office openxml try: stripper_class = STRIPPERS[mime] -- cgit v1.3