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
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment