示例#1
0
    def defaults(self):
        """Return the defaults, with their values interpolated (with the
        defaults dict itself)

        Mainly to support defaults using values such as %(here)s
        """
        defaults = ConfigParser.defaults(self).copy()
        for key, val in iteritems(defaults):
            defaults[key] = self.get('DEFAULT', key) or val
        return defaults
示例#2
0
    def defaults(self):
        """Return the defaults, with their values interpolated (with the
        defaults dict itself)

        Mainly to support defaults using values such as %(here)s
        """
        defaults = ConfigParser.defaults(self).copy()
        for key, val in iteritems(defaults):
            defaults[key] = self.get('DEFAULT', key) or val
        return defaults
示例#3
0
 def update_defaults(self, new_defaults, overwrite=True):
     for key, value in iteritems(new_defaults):
         if not overwrite and key in self.parser._defaults:
             continue
         self.parser._defaults[key] = value
示例#4
0
 def update_defaults(self, new_defaults, overwrite=True):
     for key, value in iteritems(new_defaults):
         if not overwrite and key in self.parser._defaults:
             continue
         self.parser._defaults[key] = value