- # the files dict must exist and filename needs to be read-only
- if not hasattr(
- self, "files"
- ) or not (
- self.filename in self.files and self.files[
- self.filename
- ].is_writeable()
- ):
-
- # clear out all read-only files
- if hasattr(self, "files"):
- for data_filename in list(self.files.keys()):
- if not self.files[data_filename].is_writeable():
- del self.files[data_filename]
-
- # start loading from the initial file
- mudpy.data.Data(self.filename, self)
+ # start populating the (re)files dict from the base config
+ self.files = {}
+ mudpy.data.Data(self.filename, self)