def get_collector_version()

in olddocs/gen_edot_col_components/tools.py [0:0]


def get_collector_version(filePath):
    with open(filePath, 'r', encoding='utf-8') as file:
        content = file.read()
        
    lines = content.splitlines()
    versions_section = False
    for line in lines:
        if line.startswith('edot_versions'):
            versions_section = True
        if versions_section and 'collector' in line:
            return line[(line.rfind(':') + 1):].strip()
            
    return 'main'