add basic error handling
This commit is contained in:
@ -61,6 +61,13 @@ def solution_to_file(buffer, total_form_items, forms):
|
||||
|
||||
return buff2
|
||||
|
||||
def error_to_file(buffer, error):
|
||||
wr = csv.writer(buffer, dialect='excel', delimiter=',')
|
||||
wr.writerow(['status'])
|
||||
wr.writerow([error.args[0]])
|
||||
|
||||
return io.BytesIO(buffer.getvalue().encode())
|
||||
|
||||
def key_to_uuid(key):
|
||||
return re.split("_", key)[0]
|
||||
|
||||
|
Reference in New Issue
Block a user