mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-23 06:37:15 +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')
|
||||
return 1
|
||||
|
||||
try:
|
||||
gzipencoded = gzip.compress(paste_content)
|
||||
gzip64encoded = base64.standard_b64encode(gzipencoded).decode()
|
||||
except:
|
||||
abord_file_submission(uuid, "file error")
|
||||
continue
|
||||
|
||||
# send paste to Global module
|
||||
relay_message = "{0} {1}".format(save_path, gzip64encoded)
|
||||
|
|
Loading…
Reference in a new issue