applied
Wed, Sep 04, 2013 at 11:08:13AM CEST, rpazdera(a)redhat.com wrote:
There is the bug in the way the <task> tags were processed. The
processor didn't ignore comments and considered them to be invalid
commands.
This commit fixes that.
Reported-by: Ondrej Lichtner <olichtne(a)redhat.com>
Signed-off-by: Radek Pazdera <rpazdera(a)redhat.com>
---
lnst/Controller/RecipeParser.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lnst/Controller/RecipeParser.py b/lnst/Controller/RecipeParser.py
index 9bebe8c..9311b4a 100644
--- a/lnst/Controller/RecipeParser.py
+++ b/lnst/Controller/RecipeParser.py
@@ -14,6 +14,7 @@ import logging
import os
import re
import sys
+from lxml import etree
from lnst.Common.Config import lnst_config
from lnst.Common.NetUtils import normalize_hwaddr
from lnst.Common.Utils import bool_it
@@ -157,6 +158,10 @@ class RecipeParser(XmlParser):
if len(task_tag) > 0:
task["commands"] = XmlCollection(task_tag)
for cmd_tag in task_tag:
+ # Ignore comments
+ if cmd_tag.tag is etree.Comment:
+ continue
+
if cmd_tag.tag == "run":
cmd = self._process_run_cmd(cmd_tag)
elif cmd_tag.tag == "config":
--
1.8.3.1
_______________________________________________
LNST-developers mailing list
LNST-developers(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/lnst-developers