0

Converted some print statements to logging statments

This commit is contained in:
Andrew Chin
2011-03-30 20:49:27 -04:00
parent 5e4383cd66
commit 3f62beb1b0
2 changed files with 15 additions and 11 deletions

View File

@@ -100,7 +100,7 @@ def main():
sys.exit(0)
if len(args) < 1:
print "You need to give me your world number or directory"
logging.error("You need to give me your world number or directory")
parser.print_help()
list_worlds()
sys.exit(1)
@@ -113,7 +113,7 @@ def main():
# if there are no worlds found at all, exit now
if not worlds:
parser.print_help()
print "\nInvalid world path"
logging.error("Invalid world path")
sys.exit(1)
try:
@@ -126,12 +126,12 @@ def main():
except KeyError:
# it's not a number, name, or path
parser.print_help()
print "Invalid world name or path"
logging.error("Invalid world name or path")
sys.exit(1)
except KeyError:
# it was an invalid number
parser.print_help()
print "Invalid world number"
logging.error("Invalid world number")
sys.exit(1)
if len(args) != 2: