Example #1
0
    def check(self):
        try:
            self.chips = list(self.configuration['chips'])
        except (KeyError, TypeError):
            self.error("No path to log specified. Using all chips.")
        try:
            global ORDER
            ORDER = list(self.configuration['types'])
        except (KeyError, TypeError):
            self.error("No path to log specified. Using all sensor types.")
        try:
            sensors.init()
        except Exception as e:
            self.error(e)
            return False
        try:
            self._create_definitions()
        except:
            return False

        if len(self.definitions) == 0:
            self.error("No sensors found")
            return False

        return True
Example #2
0
    def check(self):
        try:
            self.chips = list(self.configuration['chips'])
        except (KeyError, TypeError):
            self.error("No path to log specified. Using all chips.")
        try:
            global ORDER
            ORDER = list(self.configuration['types'])
        except (KeyError, TypeError):
            self.error("No path to log specified. Using all sensor types.")
        try:
            sensors.init()
        except Exception as e:
            self.error(e)
            return False
        try:
            self._create_definitions()
        except:
            return False

        if len(self.definitions) == 0:
            self.error("No sensors found")
            return False

        return True
Example #3
0
    def check(self):
        try:
            sensors.init()
        except Exception as e:
            self.error(e)
            return False

        try:
            self._create_definitions()
        except Exception as e:
            self.error(e)
            return False
        return True
Example #4
0
    def check(self):
        try:
            sensors.init()
        except Exception as e:
            self.error(e)
            return False

        try:
            self._create_definitions()
        except Exception as e:
            self.error(e)
            return False
        return True
Example #5
0
    def check(self):
        try:
            sensors.init()
        except Exception as e:
            self.error(e)
            return False
        
        try:
            self.choice = next(self.choice)
        except StopIteration:
            # That can not happen but..
            self.choice = ('Celsius', lambda x: x)
            self.calc = self.choice[1]
        else:
            self.calc = self.choice[1]

        try:
            self._create_definitions()
        except Exception as e:
            self.error(e)
            return False

        return True