fixed bug when overviewer.dat exists in world dir, but output dir does not exist
This commit is contained in:
@@ -119,6 +119,11 @@ class World(object):
|
|||||||
logging.warning("Moving overviewer.dat to OutputDir")
|
logging.warning("Moving overviewer.dat to OutputDir")
|
||||||
import shutil
|
import shutil
|
||||||
try:
|
try:
|
||||||
|
# make sure destination dir actually exists
|
||||||
|
try:
|
||||||
|
os.mkdir(self.outputdir)
|
||||||
|
except OSError: # already exists, or failed
|
||||||
|
pass
|
||||||
shutil.move(self.pickleFile, self.outputdir)
|
shutil.move(self.pickleFile, self.outputdir)
|
||||||
logging.info("overviewer.dat moved")
|
logging.info("overviewer.dat moved")
|
||||||
except BaseException as ex:
|
except BaseException as ex:
|
||||||
|
|||||||
Reference in New Issue
Block a user