Skip to content
Snippets Groups Projects
Commit 0dc2964e authored by Simon Magnin-Feysot's avatar Simon Magnin-Feysot
Browse files

refactor and correct CI

parent 5263e5b6
Branches
No related tags found
No related merge requests found
Pipeline #19549 failed
......@@ -58,7 +58,6 @@ def create_arg_parser() -> argparse.ArgumentParser:
def show_meta(filename: str):
recursive_mtype = ["application/zip"]
if not __check_file(filename):
return
......@@ -68,24 +67,23 @@ def show_meta(filename: str):
if p is None:
print("[-] %s's format (%s) is not supported" % (filename, mtype))
return
print_meta(metadata)
__print_meta(metadata)
def print_meta(metadata: dict):
def __print_meta(metadata: dict):
if not metadata:
print(" No metadata found")
return
for k, v in metadata:
zipmeta = v
zipmeta_name = k
try: # FIXME this is ugly.
if not isinstance(zipmeta, dict):
if not isinstance(v, dict):
try: # FIXME this is ugly.
print(" %s: %s" % (k, v))
else:
print_meta(v)
except UnicodeEncodeError:
print(" %s: harmful content" % k)
except UnicodeEncodeError:
print(" %s: harmful content" % k)
else:
__print_meta(v)
return
def clean_meta(filename: str, is_lightweight: bool, policy: UnknownMemberPolicy) -> bool:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment