diff options
Diffstat (limited to 'lib/mat.py')
| -rw-r--r-- | lib/mat.py | 11 |
1 files changed, 7 insertions, 4 deletions
| @@ -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 | ||
| 57 | def create_class_file(name, backup): | 57 | def 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) | ||
