Skip to content
Snippets Groups Projects
Commit 5f889eff authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Add specific error if a protocol is imported from an empty etherpad.

/close #27
parent 0737e4c6
No related branches found
No related tags found
No related merge requests found
......@@ -95,6 +95,11 @@ def parse_protocol_async_inner(protocol, encoded_kwargs):
db.session.add(error)
db.session.commit()
return
if protocol.source == config.EMPTY_ETHERPAD:
error = protocol.create_error("Parsing", "The etherpad is unmodified and does not contain a protocol.", protocol.source)
db.session.add(error)
db.session.commit()
return
tree = None
try:
tree = parse(protocol.source)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment