summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/implementation_notes.md2
-rw-r--r--libmat2/abstract.py4
-rwxr-xr-xmat24
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
7Due to *popular* request, MAT2 is providing a *lightweight* cleaning mode, 7Due to *popular* request, MAT2 is providing a *lightweight* cleaning mode,
8that only cleans the superficial metadata of your file, but not 8that only cleans the superficial metadata of your file, but not
9the ones that might be in **embeded** resources. Like for example, 9the ones that might be in **embedded** resources. Like for example,
10images in a PDF or an office document. 10images in a PDF or an office document.
11 11
12Revisions handling 12Revisions 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
8class AbstractParser(abc.ABC): 8class 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]
diff --git a/mat2 b/mat2
index 23792b4..dc316e9 100755
--- a/mat2
+++ b/mat2
@@ -68,7 +68,7 @@ def show_meta(filename: str):
68 print(" %s: harmful content" % k) 68 print(" %s: harmful content" % k)
69 69
70def clean_meta(params: Tuple[str, bool]) -> bool: 70def 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