mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-13 01:58:22 +00:00
fix: catch file error in paste submission
This commit is contained in:
parent
5908710b34
commit
407aa14244
1 changed files with 6 additions and 2 deletions
|
@ -29,8 +29,12 @@ def create_paste(uuid, paste_content, ltags, ltagsgalaxies, name):
|
||||||
addError(uuid, 'File: ' + save_path + ' already exist in submitted pastes')
|
addError(uuid, 'File: ' + save_path + ' already exist in submitted pastes')
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
try:
|
||||||
gzipencoded = gzip.compress(paste_content)
|
gzipencoded = gzip.compress(paste_content)
|
||||||
gzip64encoded = base64.standard_b64encode(gzipencoded).decode()
|
gzip64encoded = base64.standard_b64encode(gzipencoded).decode()
|
||||||
|
except:
|
||||||
|
abord_file_submission(uuid, "file error")
|
||||||
|
continue
|
||||||
|
|
||||||
# send paste to Global module
|
# send paste to Global module
|
||||||
relay_message = "{0} {1}".format(save_path, gzip64encoded)
|
relay_message = "{0} {1}".format(save_path, gzip64encoded)
|
||||||
|
|
Loading…
Reference in a new issue