Scratch this patchset, I sent a new, better, one. We do use this
functionality as i have discovered.
On Fri, Oct 30, 2015 at 12:58:50PM +0100, Jan Tluka wrote:
Fri, Oct 30, 2015 at 12:49:50PM CET, olichtne(a)redhat.com wrote:
>From: Ondrej Lichtner <olichtne(a)redhat.com>
>
>The PerfRepo objects have the ability to be initialized from an XML
>Element tree, corresponding to an XML response from the REST API.
>However this feature causes a problem on RHEL 6 machines where only
>Python 2.6 is available and the ElementTree API is different. Because of
>this and the fact that we don't use this feature anywhere this patch
>removes that functionality.
>
>Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
>---
> lnst/Controller/PerfRepo.py | 40 +++++++++++++++-------------------------
> 1 file changed, 15 insertions(+), 25 deletions(-)
>
>diff --git a/lnst/Controller/PerfRepo.py b/lnst/Controller/PerfRepo.py
>index 3d2eed3..305a766 100644
>--- a/lnst/Controller/PerfRepo.py
>+++ b/lnst/Controller/PerfRepo.py
>@@ -60,11 +60,9 @@ class PerfRepoTest(PerfRepoObject):
> self._description = None
> self._groupid = None
> self._metrics = []
>- elif type(xml) is StringType or isinstance(xml, Element):
>- if type(xml) is StringType:
>- root = ElementTree.fromstring(xml)
>- else:
>- root = xml
>+ elif type(xml) is StringType:
>+ root = ElementTree.fromstring(xml)
>+
> if root.tag != "test":
> raise PerfRepoException("Invalid xml.")
>
>@@ -171,11 +169,9 @@ class PerfRepoTestExecution(PerfRepoObject):
> self._values = []
> self._tags = []
> self._parameters = []
>- elif type(xml) is StringType or isinstance(xml, Element):
>- if type(xml) is StringType:
>- root = ElementTree.fromstring(xml)
>- else:
>- root = xml
>+ elif type(xml) is StringType:
>+ root = ElementTree.fromstring(xml)
>+
> if root.tag != "testExecution":
> raise PerfRepoException("Invalid xml.")
>
>@@ -340,11 +336,9 @@ class PerfRepoValue(PerfRepoObject):
> self._metricName = None
> self._result = None
> self._parameters = []
>- elif type(xml) is StringType or isinstance(xml, Element):
>- if type(xml) is StringType:
>- root = ElementTree.fromstring(xml)
>- else:
>- root = xml
>+ elif type(xml) is StringType:
>+ root = ElementTree.fromstring(xml)
>+
> if root.tag != "value":
> raise PerfRepoException("Invalid xml.")
>
>@@ -420,11 +414,9 @@ class PerfRepoMetric(PerfRepoObject):
> self._name = None
> self._description = None
> self._comparator = None
>- elif type(xml) is StringType or isinstance(xml, Element):
>- if type(xml) is StringType:
>- root = ElementTree.fromstring(xml)
>- else:
>- root = xml
>+ elif type(xml) is StringType:
>+ root = ElementTree.fromstring(xml)
>+
> if root.tag != "metric":
> raise PerfRepoException("Invalid xml.")
>
>@@ -493,11 +485,9 @@ class PerfRepoReport(PerfRepoObject):
> self._name = None
> self._type = None
> self._properties = {}
>- elif type(xml) is StringType or isinstance(xml, Element):
>- if type(xml) is StringType:
>- root = ElementTree.fromstring(xml)
>- else:
>- root = xml
>+ elif type(xml) is StringType:
>+ root = ElementTree.fromstring(xml)
>+
> if root.tag != "report":
> raise PerfRepoException("Invalid xml.")
>
>--
>2.6.2
>
>_______________________________________________
>LNST-developers mailing list
>LNST-developers(a)lists.fedorahosted.org
>https://lists.fedorahosted.org/mailman/listinfo/lnst-developers
Ack to series.
Acked-by: Jan Tluka <jtluka(a)redhat.com>