Example #1
0
 def put(self):
     user = self.get_current_user()
     if user is None:
         raise RuntimeError
     config = self.request.json['config']
     c = ConfigParser()
     for section in config:
         c.add_section(section)
         for option in config[section]:
             c.add_option(option)
             c.set(section, option, config[section][option])
     user.set_config(c)