(self)
Re-reads config file.
Re-reads config file.
Re - reads config file .
def reload(self):
        """Re-reads config file."""
        if self.filename:
            self.cf.read(self.filename)
        if not self.cf.has_section(self.main_section):
            raise Exception("Wrong config file, no section '%s'" % self.main_section)

        # apply default if key not set
        for k, v in self.defs.items():
            if not self.cf.has_option(self.main_section, k):
                self.cf.set(self.main_section, k, v)

        # apply overrides
        if self.override:
            for k, v in self.override.items():
                self.cf.set(self.main_section, k, v)
def reload ( self ) : if self . filename : self . cf . read ( self . filename ) if not self . cf . has_section ( self . main_section ) : raise Exception ( "Wrong config file, no section '%s'" % self . main_section ) # apply default if key not set for k , v in self . defs . items ( ) : if not self . cf . has_option ( self . main_section , k ) : self . cf . set ( self . main_section , k , v ) # apply overrides if self . override : for k , v in self . override . items ( ) : self . cf . set ( self . main_section , k , v )