def _get_flag(self, id):
    ret = self._run_read_command((b'get flag state ' + bytes(str(id), encoding='ascii')))
    if (ret in self.flag_return_values[False]):
        return False
    elif (ret in self.flag_return_values[True]):
        return True
    else:
        raise Exception(('Flag value not supported: ' + ret))
def _get_flag(self, id):
    ret = self._run_read_command((b'get flag state ' + bytes(str(id), encoding='ascii')))
    if (ret in self.flag_return_values[False]):
        return False
    elif (ret in self.flag_return_values[True]):
        return True
    else:
        raise Exception(('Flag value not supported: ' + ret))