コード例 #1
0
ファイル: misc.py プロジェクト: JosuaKrause/reprozip
 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()
コード例 #2
0
ファイル: default.py プロジェクト: hugobowne/reprozip
    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)
コード例 #3
0
ファイル: default.py プロジェクト: JosuaKrause/reprozip
    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)
コード例 #4
0
ファイル: default.py プロジェクト: lcw/reprozip
    def download_and_print(self, remote_path):
        remote_path = join_root(self.root, remote_path)

        # Output to stdout
        if not remote_path.exists():
            logger.critical("Can't get output file (doesn't exist): %s",
                            remote_path)
            return False
        with remote_path.open('rb') as fp:
            copyfile(fp, sys.stdout.buffer)
        return True
コード例 #5
0
ファイル: misc.py プロジェクト: satra/reprozip
 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
コード例 #6
0
ファイル: misc.py プロジェクト: koconne8/reprozip
 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