diff --git a/sparv/api/util/install.py b/sparv/api/util/install.py index bb8917fc..2d542091 100644 --- a/sparv/api/util/install.py +++ b/sparv/api/util/install.py @@ -10,7 +10,7 @@ logger = get_logger(__name__) -def install_file(local_file, host, remote_file): +def install_file(local_file, host=None, remote_file=None): """Rsync a file to a target host.""" system.rsync(local_file, host, remote_file) diff --git a/sparv/api/util/system.py b/sparv/api/util/system.py index 231b985b..8b754eea 100644 --- a/sparv/api/util/system.py +++ b/sparv/api/util/system.py @@ -153,6 +153,7 @@ def rsync(local, host=None, remote=None): When syncing directories, extraneous files in destination dirs are deleted. """ + assert host or remote, "Either 'host' or 'remote' must be set." if remote is None: remote = local remote_dir = os.path.dirname(remote)