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): ...@@ -95,6 +95,11 @@ def parse_protocol_async_inner(protocol, encoded_kwargs):
db.session.add(error) db.session.add(error)
db.session.commit() db.session.commit()
return return
if protocol.source == config.EMPTY_ETHERPAD:
error = protocol.create_error("Parsing", "The etherpad is unmodified and does not contain a protocol.", protocol.source)
tree = None tree = None
try: try:
tree = parse(protocol.source) tree = parse(protocol.source)
Supports Markdown
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