From 3bf0771de8caed5dea0fc8841eb257d1c70d5df5 Mon Sep 17 00:00:00 2001 From: Ryan Gerstenkorn Date: Wed, 10 Feb 2021 11:40:04 -0600 Subject: [PATCH] Fix wrong init_vagrant return type --- dsnap/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dsnap/utils.py b/dsnap/utils.py index c25ec8b..9702aaf 100644 --- a/dsnap/utils.py +++ b/dsnap/utils.py @@ -159,12 +159,12 @@ def sha256_check(data: bytes, digest: str) -> bool: return result -def init_vagrant(out_dir: Path = Path('.'), force=False) -> Path: +def init_vagrant(out_dir: Path = Path('.'), force=False) -> Optional[Path]: """Initializes out_dir directory with a templated Vagrantfile for mounting downloaded images""" template = Path(__file__).parent.joinpath(Path('templates/Vagrantfile')) out = out_dir.joinpath(Path('Vagrantfile').name) if out.exists() and not force: - return '' + return None else: out.write_text(template.read_text()) return out