2561: set the umask when using config-export r=mergify[bot] a=nextgens

## What type of PR?

enhancement

## What does this PR do?

Set a better umask when using config-export


Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
main
bors[bot] 2 years ago committed by GitHub
commit b49d9ce243
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -385,6 +385,7 @@ def config_export(full=False, secrets=False, color=False, dns=False, output=None
'dns': dns,
}
old_umask = os.umask(0o077)
try:
schema = MailuSchema(only=only, context=context)
if as_json:
@ -396,6 +397,8 @@ def config_export(full=False, secrets=False, color=False, dns=False, output=None
if msg := log.format_exception(exc):
raise click.ClickException(msg) from exc
raise
finally:
os.umask(old_umask)
@mailu.command()

Loading…
Cancel
Save