def configure(self, cd): CompositeNode.configure(self, cd) try: log_on_change = get_c_stat_log_on_change(self.c_stat_name) except: # If this happens, it is probably because the stat disappeared self.log_stat_disappeared() return None set_attribute(self, 'log_on_change', log_on_change, cd, int) set_attribute(self, 'time_last_changed', ctime(0), cd, str)
def configure(self, cd): CompositeNode.configure(self, cd) try: log_on_change = get_c_stat_log_on_change(self.c_stat_name) except: # If this happens, it is probably because the stat disappeared self.log_stat_disappeared() return None set_attribute(self, 'log_on_change', log_on_change, cd, int) set_attribute(self, 'time_last_changed', ctime(0), cd, str)
def configuration(self): cd = CompositeNode.configuration(self) try: self.log_on_change = get_c_stat_log_on_change(self.c_stat_name) except: # If this happens, it is probably because the stat disappeared self.log_stat_disappeared() return None if self.log_on_change: try: last_changed = get_c_stat_time_last_changed(self.c_stat_name) except: # If this happens, it is probably because the stat disappeared self.log_stat_disappeared() return None self.time_last_changed = ctime(last_changed) else: self.time_last_changed = 'N/A' get_attribute(self, 'log_on_change', cd, int) get_attribute(self, 'time_last_changed', cd, str) return cd
def configuration(self): cd = CompositeNode.configuration(self) try: self.log_on_change = get_c_stat_log_on_change(self.c_stat_name) except: # If this happens, it is probably because the stat disappeared self.log_stat_disappeared() return None if self.log_on_change: try: last_changed = get_c_stat_time_last_changed(self.c_stat_name) except: # If this happens, it is probably because the stat disappeared self.log_stat_disappeared() return None self.time_last_changed = ctime(last_changed) else: self.time_last_changed = 'N/A' get_attribute(self, 'log_on_change', cd, int) get_attribute(self, 'time_last_changed', cd, str) return cd