my eye

Handle broken/missing etherpad installation

Committed 596ce1

--- a/webint_editor/__init__.py
+++ b/webint_editor/__init__.py

 
     def post(self):
         form = web.form("pad_id", context=None)
-        etherpad_content = sqlyte.db(
-            "/home/admin/app/run/media/pads/etherpad-lite/var/sqlite.db"
-        ).select("store", where="key = ?", vals=[f"pad:{form.pad_id}"])[0]["value"]
-        content = json.loads(etherpad_content)["atext"]["text"]
+        try:
+            etherpad_content = sqlyte.db(
+                "/home/admin/app/run/media/pads/etherpad-lite/var/sqlite.db"
+            ).select("store", where="key = ?", vals=[f"pad:{form.pad_id}"])[0]["value"]
+            content = json.loads(etherpad_content)["atext"]["text"]
+        except sqlyte.OperationalError:
+            content = "• etherpad not available •"
         rendered = str(
             web.mkdn(
                 str(