How to use the reprounzip-vagrant.reprounzip.unpackers.vagrant.__init__.SSHUploader function in reprounzip-vagrant

To help you get started, we’ve selected a few reprounzip-vagrant examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github VIDA-NYU / reprozip / reprounzip-vagrant / reprounzip / unpackers / vagrant / __init__.py View on Github external
def vagrant_upload(args):
    """Replaces an input file in the VM.
    """
    target = Path(args.target[0])
    files = args.file
    unpacked_info = read_dict(target)
    input_files = unpacked_info.setdefault('input_files', {})
    use_chroot = unpacked_info['use_chroot']

    try:
        SSHUploader(target, input_files, files, use_chroot)
    finally:
        write_dict(target, unpacked_info)