Jonas Fietz  committed 226040e

Fix config handling for resetting the default

Fix this bug which was due to internal changes

  • Participants
  • Parent commits 8b005de
  • Branches default

Comments (0)

Files changed (1)

File zine/

         if key in self._converted_values:
             return self._converted_values[key]
         elif key in self._remove:
-            return self.cfg.config_vars[key][1]
+            return self.cfg.config_vars[key].get_default()
         return self.cfg[key]
     def __setitem__(self, key, value):
         if isinstance(value, str):
             value = value.decode('utf-8')
         field = self.cfg.config_vars[key]
+        if value == field.get_default():
+            self.revert_to_default(key)
+            return
         self._values[key] = field.to_primitive(value)
         self._converted_values[key] = value