X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=blobdiff_plain;f=mudpy%2Fdata.py;h=b73959a1b63d857657dbdd4f5afce32c3746e593;hp=637104598974b8aa80f8c22ffc60dc55f2926c8d;hb=204ea77ed37ec8bedee7465577106a3ac420523f;hpb=7dcd8a59f035d8762dc028e7062de2883b1c89c2 diff --git a/mudpy/data.py b/mudpy/data.py index 6371045..b73959a 100644 --- a/mudpy/data.py +++ b/mudpy/data.py @@ -1,8 +1,8 @@ """Data interface functions for the mudpy engine.""" -# Copyright (c) 2004-2018 Jeremy Stanley . Permission -# to use, copy, modify, and distribute this software is granted under -# terms provided in the LICENSE file distributed with this software. +# Copyright (c) 2004-2018 mudpy authors. Permission to use, copy, +# modify, and distribute this software is granted under terms +# provided in the LICENSE file distributed with this software. import os import re @@ -74,13 +74,7 @@ class Data: 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 @@ -117,10 +111,9 @@ class Data: ): # make parent directories if necessary - if not os.path.exists(os.path.dirname(self.source)): - old_umask = os.umask(normal_umask) - os.makedirs(os.path.dirname(self.source)) - os.umask(old_umask) + old_umask = os.umask(normal_umask) + os.makedirs(os.path.dirname(self.source), exist_ok=True) + os.umask(old_umask) # backup the file if "mudpy.limit" in self.universe.contents: