CLI: Interactive shell only when stdin is a TTY

This commit is contained in:
Thomas Perl 2011-02-25 19:04:51 +01:00
parent ba1464d7f8
commit dea3395b1e

View file

@ -471,7 +471,8 @@ if __name__ == '__main__':
args = sys.argv[1:]
if args:
cli._parse(args) or sys.stderr.write(stylize(__doc__))
else:
elif sys.stdout.isatty():
cli._shell()
else:
sys.stdout.write(__doc__)