Merge branch 'cassandra-2.1' into trunk

This commit is contained in:
Mikhail Stepura 2014-05-08 13:33:00 -07:00
commit 310d6e4efb
2 changed files with 5 additions and 1 deletions

View File

@ -29,7 +29,7 @@ Merged from 1.2:
* Update system.peers correctly when relocating tokens (CASSANDRA-7126)
* Add Google Compute Engine snitch (CASSANDRA-7132)
* remove duplicate query for local tokens (CASSANDRA-7182)
* exit CQLSH with error status code if script fails (CASSANDRA-6344)
2.1.0-beta2
* Increase default CL space to 8GB (CASSANDRA-7031)

View File

@ -520,6 +520,7 @@ class Shell(cmd.Cmd):
cassandra.cqltypes.BytesType.deserialize = staticmethod(cassandra.cqltypes.BytesType.validate)
cassandra.cqltypes.CassandraType.support_empty_values = True
self.empty_lines = 0
self.statement_error = False
def set_expanded_cql_version(self, ver):
ver, vertuple = full_cql_version(ver)
@ -1687,6 +1688,7 @@ class Shell(cmd.Cmd):
self.query_out.flush()
def printerr(self, text, color=RED, newline=True, shownum=None):
self.statement_error = True
if shownum is None:
shownum = self.show_line_nums
if shownum:
@ -1857,6 +1859,8 @@ def main(options, hostname, port):
shell.cmdloop()
save_history()
if options.file and shell.statement_error:
sys.exit(2)
if __name__ == '__main__':
main(*read_options(sys.argv[1:], os.environ))