def set(self, s):
        s = s.upper()
        try:
            try:
                level = logging._levelNames[s]
            except AttributeError:
                level = logging._nameToLevel[s]
        except KeyError:
            try:
                level = int(s)
            except ValueError:
                self.error()
        if level < self.minimumLevel:
            self.error()
        if self.handler is not None:
            self.handler.setLevel(level)
        self.setValue(level)
dataset/ETHPy150Open ProgVal/Limnoria/src/log.py/ValidLogLevel.set/original