diff options
| -rw-r--r-- | lib/mat.py | 5 |
1 files changed, 2 insertions, 3 deletions
| @@ -4,7 +4,6 @@ | |||
| 4 | Metadata anonymisation toolkit library | 4 | Metadata anonymisation toolkit library |
| 5 | ''' | 5 | ''' |
| 6 | 6 | ||
| 7 | import sys | ||
| 8 | import os | 7 | import os |
| 9 | import subprocess | 8 | import subprocess |
| 10 | 9 | ||
| @@ -47,7 +46,7 @@ def is_secure(filename): | |||
| 47 | 46 | ||
| 48 | if not(os.path.isfile(filename)): #check if the file exist | 47 | if not(os.path.isfile(filename)): #check if the file exist |
| 49 | print("Error: %s is not a valid file" % filename) | 48 | print("Error: %s is not a valid file" % filename) |
| 50 | sys.exit(1) | 49 | return |
| 51 | 50 | ||
| 52 | def create_class_file(name, backup): | 51 | def create_class_file(name, backup): |
| 53 | ''' | 52 | ''' |
| @@ -75,7 +74,7 @@ def create_class_file(name, backup): | |||
| 75 | except KeyError: | 74 | except KeyError: |
| 76 | #Place for another lib than hachoir | 75 | #Place for another lib than hachoir |
| 77 | print("[+] Don't have stripper for file type %s" % editor.description) | 76 | print("[+] Don't have stripper for file type %s" % editor.description) |
| 78 | sys.exit(1) | 77 | return |
| 79 | if editor.input.__class__ == hachoir_parser.misc.PDFDocument: | 78 | if editor.input.__class__ == hachoir_parser.misc.PDFDocument: |
| 80 | return stripper_class(filename, realname, backup) | 79 | return stripper_class(filename, realname, backup) |
| 81 | return stripper_class(realname, filename, parser, editor, backup) | 80 | return stripper_class(realname, filename, parser, editor, backup) |
