summaryrefslogtreecommitdiff
path: root/lib/parser.py
diff options
context:
space:
mode:
authorjvoisin2011-07-30 21:47:31 +0200
committerjvoisin2011-07-30 21:47:31 +0200
commit5715ba52f2238af513b0b87f4aa3c0158d2c84ba (patch)
treee77829efd78b1473650a669546c3c11edc37932c /lib/parser.py
parentc9cb00bdf702ce6663e78784de63dc6d35c3d875 (diff)
Documentation, and removal of unnecessary imports
Diffstat (limited to 'lib/parser.py')
-rw-r--r--lib/parser.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/parser.py b/lib/parser.py
index 385dd78..044ef0a 100644
--- a/lib/parser.py
+++ b/lib/parser.py
@@ -6,7 +6,6 @@ import hachoir_core
6import hachoir_editor 6import hachoir_editor
7 7
8import os 8import os
9import mimetypes
10 9
11import mat 10import mat
12 11
@@ -14,6 +13,9 @@ NOMETA = ('.bmp', 'html', '.py', '.rdf', '.txt', '.xml')
14 13
15 14
16class GenericParser(object): 15class GenericParser(object):
16 '''
17 Parent class of all parsers
18 '''
17 def __init__(self, filename, parser, mime, backup, add2archive): 19 def __init__(self, filename, parser, mime, backup, add2archive):
18 self.filename = '' 20 self.filename = ''
19 self.parser = parser 21 self.parser = parser
@@ -30,7 +32,6 @@ class GenericParser(object):
30 self.basename = os.path.basename(filename) # only filename 32 self.basename = os.path.basename(filename) # only filename
31 33
32 34
33
34 def is_clean(self): 35 def is_clean(self):
35 ''' 36 '''
36 Check if the file is clean from harmful metadatas 37 Check if the file is clean from harmful metadatas
@@ -68,7 +69,7 @@ class GenericParser(object):
68 69
69 def get_meta(self): 70 def get_meta(self):
70 ''' 71 '''
71 return a dict with all the meta of the file 72 Return a dict with all the meta of the file
72 ''' 73 '''
73 metadata = {} 74 metadata = {}
74 for field in self.editor: 75 for field in self.editor: