From 9c7d6a184dd2ff2ccf9b83669235adfbc65be53c Mon Sep 17 00:00:00 2001 From: Andrew Chin Date: Sun, 6 Mar 2011 17:34:26 -0500 Subject: [PATCH] Print error messages after print_help --- chunk.py | 2 +- gmap.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/chunk.py b/chunk.py index e8ab061..48d80bb 100644 --- a/chunk.py +++ b/chunk.py @@ -256,7 +256,7 @@ class ChunkRenderer(object): try: self._level = get_lvldata(self.regionfile, self.chunkX, self.chunkY) except NoSuchChunk, e: - #logging.debug("Skipping non-existant chunk") + logging.debug("Skipping non-existant chunk") raise return self._level level = property(_load_level) diff --git a/gmap.py b/gmap.py index b5bd213..65545ad 100755 --- a/gmap.py +++ b/gmap.py @@ -74,8 +74,8 @@ def main(): # if there are no worlds found at all, exit now if not worlds: - print "Invalid world path" parser.print_help() + print "\nInvalid world path" sys.exit(1) try: @@ -87,13 +87,13 @@ def main(): worlddir = worlds[worlddir]['path'] except KeyError: # it's not a number, name, or path - print "Invalid world name or path" parser.print_help() + print "Invalid world name or path" sys.exit(1) except KeyError: # it was an invalid number - print "Invalid world number" parser.print_help() + print "Invalid world number" sys.exit(1) if not options.cachedir: