From ac2a63763f3402690f21b4f402bba5214db97582 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Sat, 22 Jul 2017 20:31:26 -0700 Subject: [PATCH] Removing TODO that basically entails testing ruamel.yaml round-tripping, which in theory already has its own tests. --- borgmatic/commands/convert_config.py | 3 --- borgmatic/config/generate.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/borgmatic/commands/convert_config.py b/borgmatic/commands/convert_config.py index 5e61a7706..ca001e0ca 100644 --- a/borgmatic/commands/convert_config.py +++ b/borgmatic/commands/convert_config.py @@ -93,9 +93,6 @@ def main(): # pragma: no cover mode=source_config_file_mode, ) - # TODO: As a backstop, check that the written config can actually be read and parsed, and - # that it matches the destination config data structure that was written. - display_result(args) except (ValueError, OSError) as error: print(error, file=sys.stderr) diff --git a/borgmatic/config/generate.py b/borgmatic/config/generate.py index 626747fd4..1a6d1a86e 100644 --- a/borgmatic/config/generate.py +++ b/borgmatic/config/generate.py @@ -50,7 +50,7 @@ def write_configuration(config_filename, config, mode=0o600): try: os.makedirs(os.path.dirname(config_filename), mode=0o700) - except FileExistsError: + except (FileExistsError, FileNotFoundError): pass with open(config_filename, 'w') as config_file: