0

moved directory creation to quadtree initialization

This commit is contained in:
Andrew Brown
2010-10-19 21:16:13 -04:00
parent f4f415514c
commit a10688132a

View File

@@ -71,6 +71,10 @@ class QuadtreeGen(object):
self.imgformat = imgformat self.imgformat = imgformat
self.optimizeimg = optimizeimg self.optimizeimg = optimizeimg
# Make the destination dir
if not os.path.exists(destdir):
os.mkdir(destdir)
if depth is None: if depth is None:
# Determine quadtree depth (midpoint is always 0,0) # Determine quadtree depth (midpoint is always 0,0)
for p in xrange(15): for p in xrange(15):
@@ -270,10 +274,6 @@ class QuadtreeGen(object):
def go(self, procs): def go(self, procs):
"""Renders all tiles""" """Renders all tiles"""
# Make the destination dir
if not os.path.exists(self.destdir):
os.mkdir(self.destdir)
curdepth = self._get_cur_depth() curdepth = self._get_cur_depth()
if curdepth != -1: if curdepth != -1:
if self.p > curdepth: if self.p > curdepth: