From 8d24b0a5864d02fa30013b171b21d32fc5a28228 Mon Sep 17 00:00:00 2001 From: Andrew Burkett Date: Tue, 26 Nov 2019 21:31:04 -0800 Subject: [PATCH] Fix a couple bugs - Remove extra closed parenthesis - Forgot to import fcntl - Add option to config schema --- borgmatic/commands/borgmatic.py | 3 ++- borgmatic/config/schema.yaml | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/borgmatic/commands/borgmatic.py b/borgmatic/commands/borgmatic.py index 94d709f2..4b68826e 100644 --- a/borgmatic/commands/borgmatic.py +++ b/borgmatic/commands/borgmatic.py @@ -3,6 +3,7 @@ import json import logging import os import sys +import fcntl from subprocess import CalledProcessError import colorama @@ -575,7 +576,7 @@ def main(): # pragma: no cover fcntl.flock(f.fileno(), fcntl.LOCK_EX | fcntl.LOCK_NB) except IOError: logger.critical("Failed to acquire lock for {}".format(config_filename)) - sys.exit(0)) + sys.exit(0) locks.append(f) summary_logs = parse_logs + list(collect_configuration_run_summary_logs(configs, arguments)) diff --git a/borgmatic/config/schema.yaml b/borgmatic/config/schema.yaml index 8b3667f4..f8aa33bf 100644 --- a/borgmatic/config/schema.yaml +++ b/borgmatic/config/schema.yaml @@ -32,6 +32,10 @@ map: type: bool desc: Stay in same file system (do not cross mount points). Defaults to false. example: true + lock_config: + type: bool + desc: Lock config when running borgmatic to prevent multiple instances from running simultaneously + example: true numeric_owner: type: bool desc: Only store/extract numeric user and group identifiers. Defaults to false.