projects
/
mudpy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove docutils dep in tox dist testenv
[mudpy.git]
/
mudpy
/
data.py
diff --git
a/mudpy/data.py
b/mudpy/data.py
index
d9eb8eb
..
be88d65
100644
(file)
--- a/
mudpy/data.py
+++ b/
mudpy/data.py
@@
-1,6
+1,6
@@
"""Data interface functions for the mudpy engine."""
"""Data interface functions for the mudpy engine."""
-# Copyright (c) 2004-201
7
Jeremy Stanley <fungi@yuggoth.org>. Permission
+# Copyright (c) 2004-201
8
Jeremy Stanley <fungi@yuggoth.org>. Permission
# to use, copy, modify, and distribute this software is granted under
# terms provided in the LICENSE file distributed with this software.
# to use, copy, modify, and distribute this software is granted under
# terms provided in the LICENSE file distributed with this software.
@@
-58,28
+58,23
@@
class Data:
self.source, relative=self.relative, universe=self.universe)
try:
self.data = yaml.safe_load(open(self.source))
self.source, relative=self.relative, universe=self.universe)
try:
self.data = yaml.safe_load(open(self.source))
+ log_entry = ("Loaded file %s into memory." % self.source, 5)
except FileNotFoundError:
# it's normal if the file is one which doesn't exist yet
self.data = {}
log_entry = ("File %s is unavailable." % self.source, 6)
except FileNotFoundError:
# it's normal if the file is one which doesn't exist yet
self.data = {}
log_entry = ("File %s is unavailable." % self.source, 6)
-
try:
-
mudpy.misc.log(*log_entry)
-
except NameError:
-
# happens when we're not far enough along in the init process
-
self.universe.setup_loglines.append(log_entry)
+ try:
+ mudpy.misc.log(*log_entry)
+ except NameError:
+ # happens when we're not far enough along in the init process
+ self.universe.setup_loglines.append(log_entry)
if not hasattr(self.universe, "files"):
self.universe.files = {}
self.universe.files[self.source] = self
includes = []
for node in list(self.data):
if node == "_load":
if not hasattr(self.universe, "files"):
self.universe.files = {}
self.universe.files[self.source] = self
includes = []
for node in list(self.data):
if node == "_load":
- for included in self.data["_load"]:
- included = find_file(
- included,
- relative=self.source,
- universe=self.universe)
- if included not in includes:
- includes.append(included)
+ includes += self.data["_load"]
continue
if node.startswith("_"):
continue
continue
if node.startswith("_"):
continue