pmbootstrap-meow/pmb/config/save.py
Oliver Smith f21c216a26
Cosmetic: use SPDX license header (!1877)
While at it, also remove unnecessary "#!/usr/bin/env python3" in files
that only get imported, and adjust other empty/comment lines in the
beginnings of the files for consistency.

This makes files easier to read, and makes the pmbootstrap codebase more
consistent with the build.postmarketos.org codebase.
2020-02-24 03:11:10 +03:00

11 lines
299 B
Python

# Copyright 2020 Oliver Smith
# SPDX-License-Identifier: GPL-3.0-or-later
import os
import logging
def save(args, cfg):
logging.debug("Save config: " + args.config)
os.makedirs(os.path.dirname(args.config), 0o700, True)
with open(args.config, "w") as handle:
cfg.write(handle)