From 44a726cd69e3e0d5c50890946b366c441a575a37 Mon Sep 17 00:00:00 2001 From: necoro <> Date: Sat, 21 Jul 2007 22:13:06 +0000 Subject: added logviewers --- portato/plugin.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'portato/plugin.py') 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) -- cgit v1.2.3