diff --git a/bin/submit_paste.py b/bin/submit_paste.py index 49c8e1f0..7417fa15 100755 --- a/bin/submit_paste.py +++ b/bin/submit_paste.py @@ -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 - gzipencoded = gzip.compress(paste_content) - gzip64encoded = base64.standard_b64encode(gzipencoded).decode() + 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)