

def get_audio_mode(self):
    audio_config = open('/home/pi/tyos/configure/audio.conf', 'r')
    file = audio_config.readlines()
    for i in range(0, len(file)):
        if (file[i][0] == '#'):
            pass
        else:
            file[i] = file[i].rstrip()
            if ('mode' in file[i]):
                mode = file[i]
    mode = mode.split('=')
    self.mode = int(mode[1])
    if (self.mode == 1):
        self.headset = False
    else:
        self.headset = True

dataset/ETHPy150Open spadgenske/TYOS/apps/settings/settings.py Run.get_audio_mode/original