diff options
| -rw-r--r-- | doc/implementation_notes.md | 2 | ||||
| -rw-r--r-- | libmat2/abstract.py | 4 | ||||
| -rwxr-xr-x | mat2 | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/doc/implementation_notes.md b/doc/implementation_notes.md index 21e8dea..b763835 100644 --- a/doc/implementation_notes.md +++ b/doc/implementation_notes.md | |||
| @@ -6,7 +6,7 @@ Lightweight cleaning mode | |||
| 6 | 6 | ||
| 7 | Due to *popular* request, MAT2 is providing a *lightweight* cleaning mode, | 7 | Due to *popular* request, MAT2 is providing a *lightweight* cleaning mode, |
| 8 | that only cleans the superficial metadata of your file, but not | 8 | that only cleans the superficial metadata of your file, but not |
| 9 | the ones that might be in **embeded** resources. Like for example, | 9 | the ones that might be in **embedded** resources. Like for example, |
| 10 | images in a PDF or an office document. | 10 | images in a PDF or an office document. |
| 11 | 11 | ||
| 12 | Revisions handling | 12 | Revisions handling |
diff --git a/libmat2/abstract.py b/libmat2/abstract.py index 52eeb50..cd72f2c 100644 --- a/libmat2/abstract.py +++ b/libmat2/abstract.py | |||
| @@ -6,8 +6,8 @@ assert Set # make pyflakes happy | |||
| 6 | 6 | ||
| 7 | 7 | ||
| 8 | class AbstractParser(abc.ABC): | 8 | class AbstractParser(abc.ABC): |
| 9 | """ This is the base classe of every parser. | 9 | """ This is the base class of every parser. |
| 10 | It might yield `ValueError` on instanciation on invalid files. | 10 | It might yield `ValueError` on instantiation on invalid files. |
| 11 | """ | 11 | """ |
| 12 | meta_list = set() # type: Set[str] | 12 | meta_list = set() # type: Set[str] |
| 13 | mimetypes = set() # type: Set[str] | 13 | mimetypes = set() # type: Set[str] |
| @@ -68,7 +68,7 @@ def show_meta(filename: str): | |||
| 68 | print(" %s: harmful content" % k) | 68 | print(" %s: harmful content" % k) |
| 69 | 69 | ||
| 70 | def clean_meta(params: Tuple[str, bool]) -> bool: | 70 | def clean_meta(params: Tuple[str, bool]) -> bool: |
| 71 | filename, is_lightweigth = params | 71 | filename, is_lightweight = params |
| 72 | if not __check_file(filename, os.R_OK|os.W_OK): | 72 | if not __check_file(filename, os.R_OK|os.W_OK): |
| 73 | return False | 73 | return False |
| 74 | 74 | ||
| @@ -76,7 +76,7 @@ def clean_meta(params: Tuple[str, bool]) -> bool: | |||
| 76 | if p is None: | 76 | if p is None: |
| 77 | print("[-] %s's format (%s) is not supported" % (filename, mtype)) | 77 | print("[-] %s's format (%s) is not supported" % (filename, mtype)) |
| 78 | return False | 78 | return False |
| 79 | if is_lightweigth: | 79 | if is_lightweight: |
| 80 | return p.remove_all_lightweight() | 80 | return p.remove_all_lightweight() |
| 81 | return p.remove_all() | 81 | return p.remove_all() |
| 82 | 82 | ||
