From c91bb544dd0d80a0115f6f7c88b4c8d63a3b6ac2 Mon Sep 17 00:00:00 2001 From: Mattia Mancini <mancini@astron.nl> Date: Wed, 1 Aug 2018 10:01:06 +0000 Subject: [PATCH] Story SW-300: fix newline error in stationtest --- LCU/Maintenance/MDB_tools/cli/mdb_loader.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/LCU/Maintenance/MDB_tools/cli/mdb_loader.py b/LCU/Maintenance/MDB_tools/cli/mdb_loader.py index 73ca6c22f6a..3b8bb994f85 100755 --- a/LCU/Maintenance/MDB_tools/cli/mdb_loader.py +++ b/LCU/Maintenance/MDB_tools/cli/mdb_loader.py @@ -73,6 +73,8 @@ def is_station_test(content): """ pattern = r'(?:\d{8})(?:\,.*)*' for line in content: + if line is '': + continue if not re.match(pattern, line): return False return True @@ -125,8 +127,7 @@ def compose_api_url_for_given_test_type(content): elif is_rtsm_test(content): query = 'rtsm/insert_raw' else: - raise ValueError('The path format cannot refer both to RTSM and station test. ' + - 'Please specify either --station_test or --rtsm') + raise ValueError('The file content is not a RTSM nor a station test output.') return query -- GitLab