From b885491e3c2d5a1bd947631afd96ed8006ef8771 Mon Sep 17 00:00:00 2001 From: "jose.lausuch" Date: Wed, 20 Jul 2016 19:34:51 +0200 Subject: Bugfix: ODL report to DB fails JIRA: FUNCTEST-370 Change-Id: I48c8927f3490b86fcf1c95656324429b70201653 Signed-off-by: jose.lausuch --- testcases/Controllers/ODL/odlreport2db.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'testcases/Controllers/ODL/odlreport2db.py') diff --git a/testcases/Controllers/ODL/odlreport2db.py b/testcases/Controllers/ODL/odlreport2db.py index 0c9f341c..368d2661 100755 --- a/testcases/Controllers/ODL/odlreport2db.py +++ b/testcases/Controllers/ODL/odlreport2db.py @@ -66,12 +66,16 @@ def parse_test(tests, details): def parse_suites(suites): data = {} details = [] - try: - for suite in suites: - data['details'] = parse_test(suite['test'], details) - except TypeError: - # suites is not iterable - data['details'] = parse_test(suites['test'], details) + for suite in suites: + a = suite['suite'] + if type(a) == list: + for b in a: + data['details'] = parse_test(b['test'], details) + else: + data['details'] = parse_test(a['test'], details) + + # data['details'] = parse_test(suite['test'], details) + # suites is not iterable return data -- cgit 1.2.3-korg