diff --git a/LCU/Maintenance/MDB_tools/cli/mdb_loader.py b/LCU/Maintenance/MDB_tools/cli/mdb_loader.py index 3b8bb994f85500d5aee2eaec078c1f7e096edaab..ec42caf54e33c2d17e58445578ee0d1ab65180d6 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)