aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation
diff options
context:
space:
mode:
Diffstat (limited to 'resources/tools/presentation')
-rw-r--r--resources/tools/presentation/generator_tables.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/resources/tools/presentation/generator_tables.py b/resources/tools/presentation/generator_tables.py
index 0ff4de6c08..195380f7fb 100644
--- a/resources/tools/presentation/generator_tables.py
+++ b/resources/tools/presentation/generator_tables.py
@@ -189,12 +189,17 @@ def table_performance_improvements(table, input_data):
tbl_item.append({"data": eval(operation)(data_lst)})
elif cmd == "operation":
operation = args[0]
- nr1 = tbl_item[int(args[1])]["data"]
- nr2 = tbl_item[int(args[2])]["data"]
- if nr1 and nr2:
- tbl_item.append({"data": eval(operation)(nr1, nr2)})
- else:
+ try:
+ nr1 = tbl_item[int(args[1])]["data"]
+ nr2 = tbl_item[int(args[2])]["data"]
+ if nr1 and nr2:
+ tbl_item.append({"data": eval(operation)(nr1, nr2)})
+ else:
+ tbl_item.append({"data": None})
+ except IndexError:
+ logging.error("No data for {0}".format(tbl_item[0]))
tbl_item.append({"data": None})
+ continue
else:
logging.error("Not supported command {0}. Skipping the table.".
format(cmd))