From f36821b7b5dc00344873b08b7715baa3fd1f2e6c Mon Sep 17 00:00:00 2001 From: Mattia Mancini <mancini@astron.nl> Date: Wed, 1 Aug 2018 10:44:10 +0000 Subject: [PATCH] SW-300: Fixing errors in mdb_loader.py --- LCU/Maintenance/MDB_tools/cli/mdb_loader.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/LCU/Maintenance/MDB_tools/cli/mdb_loader.py b/LCU/Maintenance/MDB_tools/cli/mdb_loader.py index 3b8bb994f85..ec42caf54e3 100755 --- a/LCU/Maintenance/MDB_tools/cli/mdb_loader.py +++ b/LCU/Maintenance/MDB_tools/cli/mdb_loader.py @@ -72,7 +72,7 @@ def is_station_test(content): :return: True if the content refers to a station test """ pattern = r'(?:\d{8})(?:\,.*)*' - for line in content: + for line in content.split('\n'): if line is '': continue if not re.match(pattern, line): @@ -87,7 +87,7 @@ def is_rtsm_test(content): :return: True if the content refers to a RTSM """ pattern = r'(?:#\.*)|(?:[^0-9\,]*=.*)' - for line in content: + for line in content.split('\n'): if line is '': continue if not re.match(pattern, line): @@ -102,7 +102,7 @@ def send_stationtest_rtsm_content_to_address(address, content): :param content: content of the API call :return: True if the request was successful False otherwise """ - full_address = '/'.join([address, compose_api_url_for_given_test_type(content)]) + full_address = '/'.join([address, compose_api_url_for_given_test_type(content['content'])]) logging.info('performing request to address %s', full_address) logging.debug('request content %s', content) -- GitLab