Beispiel #1
0
 def download_and_print(self, remote_path):
     # Download to temporary file
     fd, temp = Path.tempfile(prefix='reprozip_output_')
     os.close(fd)
     self.download(remote_path, temp)
     # Output to stdout
     with temp.open('rb') as fp:
         copyfile(fp, stdout_bytes)
     temp.remove()
Beispiel #2
0
    def download_and_print(self, remote_path):
        remote_path = join_root(self.root, remote_path)

        # Output to stdout
        if not remote_path.exists():
            logging.critical("Can't get output file (doesn't exist): %s",
                             remote_path)
            sys.exit(1)
        with remote_path.open('rb') as fp:
            copyfile(fp, stdout_bytes)
Beispiel #3
0
 def download_and_print(self, remote_path):
     # Download to temporary file
     fd, temp = Path.tempfile(prefix='reprozip_output_')
     os.close(fd)
     download_status = self.download(remote_path, temp)
     if download_status is not None and not download_status:
         return False
     # Output to stdout
     with temp.open('rb') as fp:
         copyfile(fp, stdout_bytes)
     temp.remove()
     return True