From: Jeremy Stanley Date: Sun, 1 Jun 2014 19:11:37 +0000 (+0000) Subject: Initialize data file contents on creation X-Git-Tag: 0.0.1~238 X-Git-Url: https://mudpy.org/gitweb?a=commitdiff_plain;h=86f645e4f4ca7fb0c1ed04dca03470324ef22f4e;p=mudpy.git Initialize data file contents on creation * lib/mudpy/data.py(DataFile.__init__): When instantiating a DataFile, initialize its data class variable as an empty dict in case it's traversed before getting populated. --- diff --git a/lib/mudpy/data.py b/lib/mudpy/data.py index db27d55..b97a8a3 100644 --- a/lib/mudpy/data.py +++ b/lib/mudpy/data.py @@ -23,6 +23,7 @@ class DataFile: def __init__(self, filename, universe): self.filename = filename self.universe = universe + self.data = {} self.load() def load(self):