Description
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()