Initialize data file contents on creation
authorJeremy Stanley <fungi@yuggoth.org>
Sun, 1 Jun 2014 19:11:37 +0000 (19:11 +0000)
committerJeremy Stanley <fungi@yuggoth.org>
Sun, 1 Jun 2014 19:11:37 +0000 (19:11 +0000)
* 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.

lib/mudpy/data.py

index db27d55..b97a8a3 100644 (file)
@@ -23,6 +23,7 @@ class DataFile:
     def __init__(self, filename, universe):
         self.filename = filename
         self.universe = universe
+        self.data = {}
         self.load()
 
     def load(self):