comments inline
2015-09-14 14:05 GMT+02:00 <olichtne(a)redhat.com>:
From: Ondrej Lichtner <olichtne(a)redhat.com>
The method would crash if obj was not an object descended from the
PerfRepoObject class. This patch fixes the problem by checking the type
of the object.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Controller/PerfRepo.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lnst/Controller/PerfRepo.py b/lnst/Controller/PerfRepo.py
index f7949d0..dac186d 100644
--- a/lnst/Controller/PerfRepo.py
+++ b/lnst/Controller/PerfRepo.py
@@ -834,6 +834,8 @@ class PerfRepoRESTAPI(object):
self._session.headers['Content-Type'] = 'text/xml'
def get_obj_url(self, obj):
+ if not isinstance(obj, PerfRepoObject):
+ return ""
this could be merged with
commit af41e0c085129d9f1f94d61dd3c84efcb7d6d64f, through interactive rebase
return self._url + obj.get_obj_url()
def test_get_by_id(self, test_id):
--
2.5.2
_______________________________________________
LNST-developers mailing list
LNST-developers(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/lnst-developers
--
Best regards,
Jiri Prochazka
LNST Developer
|
www.lnst-project.org
+420 532 294 633 | jprochaz(a)redhat.com
Red Hat Czech | Purkyňova 71/99, 612 00 Brno