summaryrefslogtreecommitdiff
path: root/portato/plugin.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2008-06-10 13:40:23 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2008-06-10 13:40:23 +0200
commite8af12efa928a1eca54216398b7ace09af169e8d (patch)
treefb5e4caa8ab25001575747263f1dc46e11856fec /portato/plugin.py
parente6135e20aa7c86bcb0639cc4d13b5845123bb6f0 (diff)
downloadportato-e8af12efa928a1eca54216398b7ace09af169e8d.tar.gz
portato-e8af12efa928a1eca54216398b7ace09af169e8d.tar.bz2
portato-e8af12efa928a1eca54216398b7ace09af169e8d.zip
Modified plugin.xsd so it allows also menu-only plugins
Diffstat (limited to '')
-rw-r--r--portato/plugin.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/portato/plugin.py b/portato/plugin.py
index bf9dc91..5926922 100644
--- a/portato/plugin.py
+++ b/portato/plugin.py
@@ -180,12 +180,13 @@ class Plugin:
"""Gets an <hooks>-elements and parses it.
@param hooks: the hooks node
- @type hooks: Node"""
+ @type hooks: NodeList"""
- for h in hooks.getElementsByTagName("hook"):
- hook = Hook(self, str(h.getAttribute("type")), str(h.getAttribute("call")))
- hook.parse_connects(h.getElementsByTagName("connect"))
- self.hooks.append(hook)
+ if hooks:
+ for h in hooks[0].getElementsByTagName("hook"):
+ hook = Hook(self, str(h.getAttribute("type")), str(h.getAttribute("call")))
+ hook.parse_connects(h.getElementsByTagName("connect"))
+ self.hooks.append(hook)
def parse_menus (self, menus):
"""Get a list of <menu>-elements and parses them.
@@ -388,7 +389,7 @@ class PluginQueue:
if frontendOK is None or frontendOK == True:
plugin = Plugin(p, elem.getElementsByTagName("name")[0], elem.getElementsByTagName("author")[0])
- plugin.parse_hooks(elem.getElementsByTagName("hooks")[0])
+ plugin.parse_hooks(elem.getElementsByTagName("hooks"))
plugin.set_import(elem.getElementsByTagName("import"))
plugin.parse_menus(elem.getElementsByTagName("menu"))
plugin.parse_options(elem.getElementsByTagName("options"))
.git/commit/ui-summary.c?h=v0.8.3.2&id=d14c5f6d3ac827e7b46831c4151638ab4b638ae1&follow=1'>Move log-functions into ui-log.cLars Hjemli5-111/+121 2006-12-11Move repo summary functions into ui-summary.cLars Hjemli4-47/+59 2006-12-11Move functions for repolist output into ui-repolist.cLars Hjemli5-70/+90 2006-12-11Move common output-functions into ui-shared.cLars Hjemli4-82/+99 2006-12-11Rename config.c to parsing.c + move cgit_parse_query from cgit.c to parsing.cLars Hjemli4-28/+29 2006-12-11Avoid infinite loops in caching layerLars Hjemli3-14/+31 2006-12-11Let 'make install' clear all cachefilesLars Hjemli1-0/+2 2006-12-11Fix cache algorithm loopholeLars Hjemli3-11/+16 2006-12-10Add version identifier in generated filesLars Hjemli2-9/+14 2006-12-10Add license file and copyright noticesLars Hjemli5-0/+372 2006-12-10Add caching infrastructureLars Hjemli9-28/+353