示例#1
0
 def from_dict(cls, d):
     config = cls()
     for k, v in six.iteritems(d):
         if v is not None:
             try:
                 config.__setattr__(k, v)
             except AttributeError:
                 raise InvalidConfigurationError("Unrecognized config option: %s" % k)
     return config
示例#2
0
 def from_dict(cls, d):
     options = cls()
     for k, v in six.iteritems(d):
         try:
             options.__setattr__(k, v)
         except AttributeError:
             raise InvalidConfigurationError(
                 "Unrecognized config option for the bitmap index options: %s" % k
             )
     return options
示例#3
0
 def from_dict(cls, d):
     config = cls()
     for k, v in d.items():
         try:
             config.__setattr__(k, v)
         except AttributeError:
             raise InvalidConfigurationError(
                 "Unrecognized config option for the reliable topic: %s" % k
             )
     return config