Add data sink to the fork_context decorator

This commit is contained in:
David Duque 2021-03-29 16:23:42 +01:00
parent 353645f8db
commit 200aefee00
No known key found for this signature in database
GPG key ID: 913FE0F2477D7D6B

View file

@ -67,6 +67,7 @@ def fork_context(f, context = default_context):
with tempfile.TemporaryDirectory() as tmpdir:
shutil.copytree(context.home_dir, f"{tmpdir}/gnupg", ignore=dirs_files_only)
kwargs["context"] = gpg.Context(armor=context.armor, home_dir=f"{tmpdir}/gnupg")
kwargs["data"] = gpg.Data()
return f(*args, **kwargs)
return wrapped