From cfd76269ef01a8011cad3040804d9d72633614f9 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Mon, 17 Oct 2016 18:23:47 +0800 Subject: galactic/snr.py: Fix the existence check of dir of catalog ouput --- fg21sim/galactic/snr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.2