summaryrefslogtreecommitdiff
path: root/portato/plugin.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--portato/plugin.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/portato/plugin.py b/portato/plugin.py
index 1aa521a..ea11c3a 100644
--- a/portato/plugin.py
+++ b/portato/plugin.py
@@ -349,8 +349,13 @@ class PluginQueue:
for p in plugins:
- if not schema.validate(etree.parse(p)):
- error("Loading plugin '%s' failed. Plugin does not comply to schema.", p)
+ try:
+ schema.assertValid(etree.parse(p))
+ except etree.XMLSyntaxError:
+ error("Loading plugin '%s' failed. Invalid XML syntax.", p)
+ continue
+ except etree.DocumentInvalid:
+ error("Loading plugin '%s' failed. Plugin does not comply with schema.", p)
continue
doc = parse(p)