parsers: Inherit the sandbox option when creating additional parsers
This commit is contained in:
parent
e6564509e1
commit
7405955ab5
@ -161,6 +161,7 @@ class ArchiveBasedAbstractParser(abstract.AbstractParser):
|
||||
|
||||
member_parser, _ = parser_factory.get_parser(full_path) # type: ignore
|
||||
if member_parser:
|
||||
member_parser.sandbox = self.sandbox
|
||||
local_meta = {**local_meta, **member_parser.get_meta()}
|
||||
|
||||
if local_meta:
|
||||
@ -248,6 +249,7 @@ class ArchiveBasedAbstractParser(abstract.AbstractParser):
|
||||
abort = True
|
||||
continue
|
||||
else:
|
||||
member_parser.sandbox = self.sandbox
|
||||
if member_parser.remove_all() is False:
|
||||
logging.warning("In file %s, something went wrong \
|
||||
with the cleaning of %s \
|
||||
|
@ -82,6 +82,7 @@ class FLACParser(MutagenParser):
|
||||
with open(fname, 'wb') as f:
|
||||
f.write(picture.data)
|
||||
p, _ = parser_factory.get_parser(fname) # type: ignore
|
||||
p.sandbox = self.sandbox
|
||||
# Mypy chokes on ternaries :/
|
||||
meta[name] = p.get_meta() if p else 'harmful data' # type: ignore
|
||||
os.remove(fname)
|
||||
|
Loading…
Reference in New Issue
Block a user