Use consistent spacing in tox variables and lists
[mudpy.git] / mudpy / data.py
index be88d65..b73959a 100644 (file)
@@ -1,8 +1,8 @@
 """Data interface functions for the mudpy engine."""
 
-# Copyright (c) 2004-2018 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.
+# 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
@@ -111,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: