diff options
| author | fumingwei <[email protected]> | 2021-06-03 16:28:35 +0800 |
|---|---|---|
| committer | fumingwei <[email protected]> | 2021-06-03 16:28:35 +0800 |
| commit | c7963f65008279942f8cf291ea7887f418cc1499 (patch) | |
| tree | c9540c781017861c4df64ea5f9dcdf2319099218 | |
| parent | 7a3a2c1e17f8ee31406959e2c20215fcdd0729e8 (diff) | |
修改split large file 抛出异常的输出错误问题
| -rw-r--r-- | file_upload_tools.py | 2 | ||||
| -rw-r--r-- | 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() |
