From a10688132af40ba40e0872aad6fcce0a36395900 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 19 Oct 2010 21:16:13 -0400 Subject: [PATCH] moved directory creation to quadtree initialization --- quadtree.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/quadtree.py b/quadtree.py index 0f2ea2f..af4d15e 100644 --- a/quadtree.py +++ b/quadtree.py @@ -71,6 +71,10 @@ class QuadtreeGen(object): self.imgformat = imgformat self.optimizeimg = optimizeimg + # Make the destination dir + if not os.path.exists(destdir): + os.mkdir(destdir) + if depth is None: # Determine quadtree depth (midpoint is always 0,0) for p in xrange(15): @@ -270,10 +274,6 @@ class QuadtreeGen(object): def go(self, procs): """Renders all tiles""" - # Make the destination dir - if not os.path.exists(self.destdir): - os.mkdir(self.destdir) - curdepth = self._get_cur_depth() if curdepth != -1: if self.p > curdepth: