cqlsh does not work with piping
-------------------------------
Key: CASSANDRA-4113
URL: https://issues.apache.org/jira/browse/CASSANDRA-4113
Project: Cassandra
Issue Type: Bug
Reporter: Pavel Matveyev
When I run cqlsh under ant like this
<target name="create-test-db">
<exec executable="../dsc-cassandra-1.0.8/bin/cqlsh"
input="./resource/test/test.cql">
</exec>
</target>
I got:
[exec] Traceback (most recent call last):
[exec] File "../dsc-cassandra-1.0.8/bin/cqlsh", line 1891, in <module>
[exec] main(*read_options(sys.argv[1:], os.environ))
[exec] File "../dsc-cassandra-1.0.8/bin/cqlsh", line 1863, in main
[exec] completekey=options.completekey)
[exec] File "../dsc-cassandra-1.0.8/bin/cqlsh", line 384, in __init__
[exec] self.output_codec = codecs.lookup(encoding)
[exec] TypeError: must be string, not None
[exec] Result: 1
I suggest replacement of:
if encoding is None:
encoding = sys.stdout.encoding
to:
if encoding is None:
encoding=locale.getpreferredencoding()
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira