summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorjvoisin2011-08-05 13:30:34 +0200
committerjvoisin2011-08-05 13:30:34 +0200
commit4b4c34d561c4ba81274c861de47c9807dbe76ca8 (patch)
tree28c5d17b07af292a31ee1fdb356a527119b8dcb3 /lib
parent52c074ffb9dbefe5f967385770246d8df237ce5e (diff)
Cleanup, and cosmetic
Diffstat (limited to 'lib')
-rw-r--r--lib/images.py4
-rw-r--r--lib/mat.py8
2 files changed, 6 insertions, 6 deletions
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
7 7
8class JpegStripper(parser.GenericParser): 8class JpegStripper(parser.GenericParser):
9 ''' 9 '''
10 Represents a .jpeg file 10 represents a jpeg file
11 ''' 11 '''
12 def _should_remove(self, field): 12 def _should_remove(self, field):
13 ''' 13 '''
@@ -23,7 +23,7 @@ class JpegStripper(parser.GenericParser):
23 23
24class PngStripper(parser.GenericParser): 24class PngStripper(parser.GenericParser):
25 ''' 25 '''
26 Represents a .png file 26 represents a png file
27 ''' 27 '''
28 def _should_remove(self, field): 28 def _should_remove(self, field):
29 ''' 29 '''
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 = {
33 'audio/mpeg': audio.MpegAudioStripper, 33 'audio/mpeg': audio.MpegAudioStripper,
34 'image/jpeg': images.JpegStripper, 34 'image/jpeg': images.JpegStripper,
35 'image/png': images.PngStripper, 35 'image/png': images.PngStripper,
36 'application/vnd.oasis.opendocument': office.OpenDocumentStripper, 36 'application/opendocument': office.OpenDocumentStripper,
37 'application/vnd.openxmlformats-officedocument': office.OpenXmlStripper, 37 'application/officeopenxml': office.OpenXmlStripper,
38} 38}
39 39
40try: 40try:
@@ -146,9 +146,9 @@ def create_class_file(name, backup, add2archive):
146 mime = mimetypes.guess_type(name)[0] 146 mime = mimetypes.guess_type(name)[0]
147 147
148 if mime.startswith('application/vnd.oasis.opendocument'): 148 if mime.startswith('application/vnd.oasis.opendocument'):
149 mime = 'application/vnd.oasis.opendocument' # opendocument fileformat 149 mime = 'application/opendocument' # opendocument fileformat
150 elif mime.startswith('application/vnd.openxmlformats-officedocument'): 150 elif mime.startswith('application/vnd.openxmlformats-officedocument'):
151 mime = 'application/vnd.openxmlformats-officedocument' 151 mime = 'application/officeopenxml' # office openxml
152 152
153 try: 153 try:
154 stripper_class = STRIPPERS[mime] 154 stripper_class = STRIPPERS[mime]