From 994e71160e54b039f87bcf456adfe6664452eb0e Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Tue, 25 Feb 2020 11:54:27 -0600 Subject: [PATCH] bug fix with directory --- data/gan.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/data/gan.py b/data/gan.py index 6e6454e..0d449d2 100644 --- a/data/gan.py +++ b/data/gan.py @@ -171,9 +171,10 @@ class GNet : root = [] for loc in path.split(os.sep) : root.append(loc) - os.mkdir(os.sep.join(root)) + if not os.path.exists(os.sep.join(root)) : + os.mkdir(os.sep.join(root)) - else: + elif not os.path.exists(path): os.mkdir(path)