X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=blobdiff_plain;f=mudpy%2Fdata.py;h=2e22c7e0e2581e6c0350f6328aa3da7044e41c64;hp=00ab923a5b316fed314ac7a5cda07fe9a6a4b981;hb=0580d77ecba37ac032dde3e3d8d7b054ccc7fd74;hpb=91f6b37e5fc36953cc1f3150695382d0822b0672 diff --git a/mudpy/data.py b/mudpy/data.py index 00ab923..2e22c7e 100644 --- a/mudpy/data.py +++ b/mudpy/data.py @@ -97,7 +97,7 @@ class DataFile: element = self.universe.contents[prefix] except KeyError: element = mudpy.misc.Element(prefix, self.universe, - self.filename) + self.filename) element.set(node[facet_pos:], self.data[node]) if prefix.startswith("mudpy.movement."): self.universe.directions.add( @@ -134,9 +134,11 @@ class DataFile: if "__control__" in self.data and "backup_count" in self.data[ "__control__"]: max_count = self.data["__control__"]["backup_count"] - else: + elif "mudpy.limit" in self.universe.contents: max_count = self.universe.contents["mudpy.limit"].get( - "backups") + "backups", 0) + else: + max_count = 0 if os.path.exists(self.filename) and max_count: backups = [] for candidate in os.listdir(os.path.dirname(self.filename)):