Exemple #1
0
 def get_attribute_value(self, attribute_name):
     glib.configcheck(self, self.logger)
     # always use "general" as config header; as file has no config header this is hard-coded
     if ':' not in attribute_name:
         attribute_name = 'general:{}'.format(attribute_name)
     else:
         attribute_name = 'general:{}'.format(attribute_name.split(':')[1])
     self.logger.debug("get_attribute_value: {}".format(attribute_name))
     return glib.configget(self._config, attribute_name)
Exemple #2
0
    def get_attribute_value(self, attribute_name):
        """Gets attribute value in in underlying model;
        attribute_name should use the following convention model_name.section_name:attribute_name
        
        Arguments:
            attribute_name {str} -- Name of BMI attribute
        
        Returns:
            float -- value of attribute
        """

        glib.configcheck(self, self.logger)
        self.logger.debug("get_attribute_value: " + attribute_name)
        return glib.configget(self._config, attribute_name)
Exemple #3
0
 def get_attribute_value(self, attribute_name):
     glib.configcheck(self, self.logger)
     self.logger.debug("get_attribute_value: {}".format(attribute_name))
     return glib.configget(self._config, attribute_name)