aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-10-17 18:23:47 +0800
committerAaron LI <aaronly.me@outlook.com>2016-10-17 18:23:47 +0800
commitcfd76269ef01a8011cad3040804d9d72633614f9 (patch)
tree1932289a655008c6f5f549bd343def2cd2bf4b43
parent3fb0539004b621631ebdb02f538b2060d31b79f9 (diff)
downloadfg21sim-cfd76269ef01a8011cad3040804d9d72633614f9.tar.bz2
galactic/snr.py: Fix the existence check of dir of catalog ouput
-rw-r--r--fg21sim/galactic/snr.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/fg21sim/galactic/snr.py b/fg21sim/galactic/snr.py
index 4f3d548..a15159d 100644
--- a/fg21sim/galactic/snr.py
+++ b/fg21sim/galactic/snr.py
@@ -115,7 +115,7 @@ class SuperNovaRemnants:
return
# Create directory if necessary
dirname = os.path.dirname(self.catalog_outfile)
- if os.path.exists(dirname):
+ if not os.path.exists(dirname):
os.mkdir(dirname)
logger.info("Created directory: {0}".format(dirname))
# Save catalog data