summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9e35733)
Prior to existence of the global universe, the destination files for
logging may not be known. Accumulate log entries during
DataFile.load() if immediate logging fails, so that they can be
flushed later once logging is possible.
self.data = yaml.load(open(self.filename))
except FileNotFoundError:
# it's normal if the file is one which doesn't exist yet
self.data = yaml.load(open(self.filename))
except FileNotFoundError:
# it's normal if the file is one which doesn't exist yet
+ log_entry = ("File %s is unavailable." % self.filename, 6)
- mudpy.misc.log("Couldn't read %s file." % self.filename, 6)
+ mudpy.misc.log(*log_entry)
except NameError:
# happens when we're not far enough along in the init process
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.filename] = self
if not hasattr(self.universe, "files"):
self.universe.files = {}
self.universe.files[self.filename] = self