diff --git a/configParser.py b/configParser.py index 0f43a34..7ed285d 100644 --- a/configParser.py +++ b/configParser.py @@ -1,5 +1,6 @@ from optparse import OptionParser import sys +import os.path class OptionsResults(object): pass @@ -61,7 +62,8 @@ class ConfigOptionParser(object): g['args'] = args try: - execfile(self.configFile, g, l) + if os.path.exists(self.configFile): + execfile(self.configFile, g, l) except NameError, ex: import traceback traceback.print_exc() diff --git a/gmap.py b/gmap.py index 50b6822..0dc7191 100755 --- a/gmap.py +++ b/gmap.py @@ -58,7 +58,6 @@ def main(): parser.add_option("-p", "--processes", dest="procs", help="How many worker processes to start. Default %s" % cpus, default=cpus, action="store", type="int") parser.add_option("-z", "--zoom", dest="zoom", help="Sets the zoom level manually instead of calculating it. This can be useful if you have outlier chunks that make your world too big. This value will make the highest zoom level contain (2**ZOOM)^2 tiles", action="store", type="int", configFileOnly=True) parser.add_option("-d", "--delete", dest="delete", help="Clear all caches. Next time you render your world, it will have to start completely over again. This is probably not a good idea for large worlds. Use this if you change texture packs and want to re-render everything.", action="store_true", commandLineOnly=True) - parser.add_option("--cachedir", dest="cachedir", help="Sets the directory where the Overviewer will save chunk images, which is an intermediate step before the tiles are generated. You must use the same directory each time to gain any benefit from the cache. If not set, this defaults to your world directory.") parser.add_option("--chunklist", dest="chunklist", help="A file containing, on each line, a path to a chunkfile to update. Instead of scanning the world directory for chunks, it will just use this list. Normal caching rules still apply.") parser.add_option("--rendermode", dest="rendermode", help="Specifies the render type: normal (default), lighting, night, or spawn.", type="choice", choices=["normal", "lighting", "night", "spawn"], required=True, default="normal") parser.add_option("--imgformat", dest="imgformat", help="The image output format to use. Currently supported: png(default), jpg. NOTE: png will always be used as the intermediate image format.", configFileOnly=True ) diff --git a/quadtree.py b/quadtree.py index ec97e50..73d982b 100644 --- a/quadtree.py +++ b/quadtree.py @@ -107,7 +107,7 @@ class QuadtreeGen(object): self.lighting = rendermode in ("lighting", "night", "spawn") self.night = rendermode in ("night", "spawn") - self.spawn = spawn in ("spawn",) + self.spawn = rendermode in ("spawn",) # Make the destination dir if not os.path.exists(destdir):