projects
/
mudpy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename internal:time to .mudpy.timing
[mudpy.git]
/
mudpy
/
data.py
diff --git
a/mudpy/data.py
b/mudpy/data.py
index
00ab923
..
8b7e731
100644
(file)
--- 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,
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(
element.set(node[facet_pos:], self.data[node])
if prefix.startswith("mudpy.movement."):
self.universe.directions.add(
@@
-134,15
+134,17
@@
class DataFile:
if "__control__" in self.data and "backup_count" in self.data[
"__control__"]:
max_count = self.data["__control__"]["backup_count"]
if "__control__" in self.data and "backup_count" in self.data[
"__control__"]:
max_count = self.data["__control__"]["backup_count"]
- el
se
:
+ el
if "mudpy.limit" in self.universe.contents
:
max_count = self.universe.contents["mudpy.limit"].get(
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)):
if re.match(
os.path.basename(self.filename) +
if os.path.exists(self.filename) and max_count:
backups = []
for candidate in os.listdir(os.path.dirname(self.filename)):
if re.match(
os.path.basename(self.filename) +
- """\.\d+$""", candidate
+
r
"""\.\d+$""", candidate
):
backups.append(int(candidate.split(".")[-1]))
backups.sort()
):
backups.append(int(candidate.split(".")[-1]))
backups.sort()