diff options
-rw-r--r-- | fg21sim/sky.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fg21sim/sky.py b/fg21sim/sky.py index 2c176ff..9187777 100644 --- a/fg21sim/sky.py +++ b/fg21sim/sky.py @@ -167,7 +167,7 @@ class SkyPatch: Write current data to file. """ outdir = os.path.dirname(outfile) - if not os.path.exists(outdir): + if outdir and (not os.path.exists(outdir)): os.makedirs(outdir) logger.info("Created output directory: %s" % outdir) image = self.data.reshape(self.ysize, self.xsize) @@ -363,7 +363,7 @@ class SkyHealpix: Write current data to file. """ outdir = os.path.dirname(outfile) - if not os.path.exists(outdir): + if outdir and (not os.path.exists(outdir)): os.makedirs(outdir) logger.info("Created output directory: %s" % outdir) if hasattr(self, "header"): |