Skip to content

Commit

Permalink
Fix wrong init_vagrant return type
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Gerstenkorn committed Feb 10, 2021
1 parent bf5b61f commit 3bf0771
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dsnap/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3bf0771

Please sign in to comment.