only prompt when stdin is a tty

This commit is contained in:
David Vierra 2011-01-05 19:33:05 -10:00
parent 2d819ede6a
commit 983597df7f

2
mce.py
View File

@ -923,7 +923,7 @@ class mce(object):
self.printUsage("heightmap")
return
if raw_input(
if not sys.stdin.isatty() or raw_input(
"This will destroy a large portion of the map and may take a long time. Did you really want to do this?"
).lower() in ("yes", "y", "1", "true"):