From c7963f65008279942f8cf291ea7887f418cc1499 Mon Sep 17 00:00:00 2001 From: fumingwei Date: Thu, 3 Jun 2021 16:28:35 +0800 Subject: 修改split large file 抛出异常的输出错误问题 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- file_upload_tools.py | 2 +- rpm_upload_tools.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/file_upload_tools.py b/file_upload_tools.py index ad9cb95..50be33a 100644 --- a/file_upload_tools.py +++ b/file_upload_tools.py @@ -188,7 +188,7 @@ def split_large_file_upload_artifact(filename): fileSize = os.path.getsize(filename) splitstatus, splitret = subprocess.getstatusoutput(splitCommand) if splitstatus != 0: - raise Exception('cannot split large file, name: %s, size: %d, info: %s' % filename, fileSize, splitret) + raise Exception('cannot split large file, name: %s, size: %d, info: %s' % (filename, fileSize, splitret)) allsize = {'size': fileSize} r = requests.post(api_url_update, data = allsize) r.raise_for_status() diff --git a/rpm_upload_tools.py b/rpm_upload_tools.py index a54985e..c403026 100644 --- a/rpm_upload_tools.py +++ b/rpm_upload_tools.py @@ -188,7 +188,7 @@ def split_large_file_upload_artifact(filename): fileSize = os.path.getsize(filename) splitstatus, splitret = subprocess.getstatusoutput(splitCommand) if splitstatus != 0: - raise Exception('cannot split large file, name: %s, size: %d, info: %s' % filename, fileSize, splitret) + raise Exception('cannot split large file, name: %s, size: %d, info: %s' % (filename, fileSize, splitret)) allsize = {'size': fileSize} r = requests.post(api_url_update, data = allsize) r.raise_for_status() -- cgit v1.2.3