# Path: startup_tests/test_manager.py
# class TestStatus(Enum):
#     Error = 1
#     Attention = 2
#     Good = 3


from configparser import NoOptionError, NoSectionError, ConfigParser
from startup_tests.test_manager import TestStatus
import tempfile
import json
import subprocess
    temp_parser.write(fp)
    return fp


def init_config(config_file):
    parser = ConfigParser()
    icecast = list()
    general = None
    audio = None  # renamed to audio instead of input as it would shadow builtin input
    errors = []

    parser.read_file(config_file)

    try:
        general = General(parser['general'])
        audio = Input(parser['input'])
    except KeyError as error:
        print "Section {0} not found. This sections contains info needed for darkice. please check your config-file".format(error)
        errors.append((TestStatus.Error,
                      "Section {0} not found. This sections contains info need for darkice. please check your config-file".format(error)))

    for i in range(0, 7):
        try:
            name = 'icecast2-' + str(i)
            tempServer = Icecast2(parser[name])
            tempServer.section_name = name
            icecast.append(tempServer)
        except KeyError as error:
            if len(icecast) == 0:
                print "Section {0} not found. At least one server section is needed. Please add a server to your config file".format(error)

# Path: startup_tests/test_manager.py
# class TestStatus(Enum):
#     Error = 1
#     Attention = 2
#     Good = 3


# Path: config.py
from configparser import NoOptionError, NoSectionError, ConfigParser
from startup_tests.test_manager import TestStatus
import tempfile
import json
import subprocess

    temp_parser.write(fp)
    return fp


def init_config(config_file):
    parser = ConfigParser()
    icecast = list()
    general = None
    audio = None  # renamed to audio instead of input as it would shadow builtin input
    errors = []

    parser.read_file(config_file)

    try:
        general = General(parser['general'])
        audio = Input(parser['input'])
    except KeyError as error:
        print "Section {0} not found. This sections contains info needed for darkice. please check your config-file".format(error)
        errors.append((TestStatus.Error,
                      "Section {0} not found. This sections contains info need for darkice. please check your config-file".format(error)))

    for i in range(0, 7):
        try:
            name = 'icecast2-' + str(i)
            tempServer = Icecast2(parser[name])
            tempServer.section_name = name
            icecast.append(tempServer)
        except KeyError as error:
            if len(icecast) == 0:
                print "Section {0} not found. At least one server section is needed. Please add a server to your config file".format(error)

                errors.append((TestStatus.Error,