summaryrefslogtreecommitdiff
path: root/lib/mat.py
diff options
context:
space:
mode:
authorjvoisin2011-07-21 21:15:09 +0200
committerjvoisin2011-07-21 21:15:09 +0200
commitbb83090afcd12893c301ef14869e84beda43ccb9 (patch)
treec314f6bb95c0e3c50b885f3d95a014e2e8164ee9 /lib/mat.py
parent54ca53de5e7df9e0c9bd9e25002386d346010594 (diff)
Add the possibility to add (or not) unsupported fileformat to outputed archives fileformat (invasive patch, sorry about that).
Diffstat (limited to 'lib/mat.py')
-rw-r--r--lib/mat.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/mat.py b/lib/mat.py
index 1d7f53b..49a84f1 100644
--- a/lib/mat.py
+++ b/lib/mat.py
@@ -52,14 +52,16 @@ def is_secure(filename):
52 52
53 if not(os.path.isfile(filename)): #check if the file exist 53 if not(os.path.isfile(filename)): #check if the file exist
54 logging.error("Error: %s is not a valid file" % filename) 54 logging.error("Error: %s is not a valid file" % filename)
55 return 55 return False
56 56
57def create_class_file(name, backup): 57def create_class_file(name, backup, add2archive):
58 ''' 58 '''
59 return a $FILETYPEStripper() class, 59 return a $FILETYPEStripper() class,
60 corresponding to the filetype of the given file 60 corresponding to the filetype of the given file
61 ''' 61 '''
62 is_secure(name) 62 if is_secure(name):
63 print 'a'
64 return
63 65
64 filename = "" 66 filename = ""
65 realname = name 67 realname = name
@@ -83,4 +85,5 @@ def create_class_file(name, backup):
83 return 85 return
84 if editor.input.__class__ == hachoir_parser.misc.PDFDocument: 86 if editor.input.__class__ == hachoir_parser.misc.PDFDocument:
85 return stripper_class(filename, realname, backup) 87 return stripper_class(filename, realname, backup)
86 return stripper_class(realname, filename, parser, editor, backup) 88 return stripper_class(realname, filename, parser, editor, backup,
89 add2archive)