three minor spelling fixes
This commit is contained in:
parent
91e80527fc
commit
3e2890eb9e
@ -6,7 +6,7 @@ Lightweight cleaning mode
|
|||||||
|
|
||||||
Due to *popular* request, MAT2 is providing a *lightweight* cleaning mode,
|
Due to *popular* request, MAT2 is providing a *lightweight* cleaning mode,
|
||||||
that only cleans the superficial metadata of your file, but not
|
that only cleans the superficial metadata of your file, but not
|
||||||
the ones that might be in **embeded** resources. Like for example,
|
the ones that might be in **embedded** resources. Like for example,
|
||||||
images in a PDF or an office document.
|
images in a PDF or an office document.
|
||||||
|
|
||||||
Revisions handling
|
Revisions handling
|
||||||
|
@ -6,8 +6,8 @@ assert Set # make pyflakes happy
|
|||||||
|
|
||||||
|
|
||||||
class AbstractParser(abc.ABC):
|
class AbstractParser(abc.ABC):
|
||||||
""" This is the base classe of every parser.
|
""" This is the base class of every parser.
|
||||||
It might yield `ValueError` on instanciation on invalid files.
|
It might yield `ValueError` on instantiation on invalid files.
|
||||||
"""
|
"""
|
||||||
meta_list = set() # type: Set[str]
|
meta_list = set() # type: Set[str]
|
||||||
mimetypes = set() # type: Set[str]
|
mimetypes = set() # type: Set[str]
|
||||||
|
4
mat2
4
mat2
@ -68,7 +68,7 @@ def show_meta(filename: str):
|
|||||||
print(" %s: harmful content" % k)
|
print(" %s: harmful content" % k)
|
||||||
|
|
||||||
def clean_meta(params: Tuple[str, bool]) -> bool:
|
def clean_meta(params: Tuple[str, bool]) -> bool:
|
||||||
filename, is_lightweigth = params
|
filename, is_lightweight = params
|
||||||
if not __check_file(filename, os.R_OK|os.W_OK):
|
if not __check_file(filename, os.R_OK|os.W_OK):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ def clean_meta(params: Tuple[str, bool]) -> bool:
|
|||||||
if p is None:
|
if p is None:
|
||||||
print("[-] %s's format (%s) is not supported" % (filename, mtype))
|
print("[-] %s's format (%s) is not supported" % (filename, mtype))
|
||||||
return False
|
return False
|
||||||
if is_lightweigth:
|
if is_lightweight:
|
||||||
return p.remove_all_lightweight()
|
return p.remove_all_lightweight()
|
||||||
return p.remove_all()
|
return p.remove_all()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user