Print error messages after print_help
This commit is contained in:
2
chunk.py
2
chunk.py
@@ -256,7 +256,7 @@ class ChunkRenderer(object):
|
|||||||
try:
|
try:
|
||||||
self._level = get_lvldata(self.regionfile, self.chunkX, self.chunkY)
|
self._level = get_lvldata(self.regionfile, self.chunkX, self.chunkY)
|
||||||
except NoSuchChunk, e:
|
except NoSuchChunk, e:
|
||||||
#logging.debug("Skipping non-existant chunk")
|
logging.debug("Skipping non-existant chunk")
|
||||||
raise
|
raise
|
||||||
return self._level
|
return self._level
|
||||||
level = property(_load_level)
|
level = property(_load_level)
|
||||||
|
|||||||
6
gmap.py
6
gmap.py
@@ -74,8 +74,8 @@ def main():
|
|||||||
|
|
||||||
# if there are no worlds found at all, exit now
|
# if there are no worlds found at all, exit now
|
||||||
if not worlds:
|
if not worlds:
|
||||||
print "Invalid world path"
|
|
||||||
parser.print_help()
|
parser.print_help()
|
||||||
|
print "\nInvalid world path"
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -87,13 +87,13 @@ def main():
|
|||||||
worlddir = worlds[worlddir]['path']
|
worlddir = worlds[worlddir]['path']
|
||||||
except KeyError:
|
except KeyError:
|
||||||
# it's not a number, name, or path
|
# it's not a number, name, or path
|
||||||
print "Invalid world name or path"
|
|
||||||
parser.print_help()
|
parser.print_help()
|
||||||
|
print "Invalid world name or path"
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
# it was an invalid number
|
# it was an invalid number
|
||||||
print "Invalid world number"
|
|
||||||
parser.print_help()
|
parser.print_help()
|
||||||
|
print "Invalid world number"
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
if not options.cachedir:
|
if not options.cachedir:
|
||||||
|
|||||||
Reference in New Issue
Block a user