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 ""
return self._url + obj.get_obj_url()
def test_get_by_id(self, test_id):
--
2.5.2