From 247698f20d7ccb068a322bbd37150595e6fc6e76 Mon Sep 17 00:00:00 2001 From: Leopoldo Teixeira Date: Thu, 21 Jan 2021 16:24:38 -0300 Subject: [PATCH] Fixing test.py as the previous version was not taking into account the last configuration from the output.txt file --- demos/5-cit-acts/test.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/demos/5-cit-acts/test.py b/demos/5-cit-acts/test.py index 7f5f75f..b93117c 100644 --- a/demos/5-cit-acts/test.py +++ b/demos/5-cit-acts/test.py @@ -10,15 +10,16 @@ def parse_config(filename): for line in lines: line = line.strip() if not line: # Empty line + if config: + configs.append(config) + config = {} continue if line.startswith("#"): # Comment continue elif line.startswith("-----"): # Configuration separator continue elif line.startswith("Configuration"): - if config: - configs.append(config) - config = {} + continue else: # Configuration parameter with its value parts = line.split() keyval = parts[2]