From a500e2835748f19d0c11bc3dfcecc71c50d9cf7e Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Fri, 14 Sep 2012 16:42:54 -0500 Subject: [PATCH] cqlsh: check for non-empty history file before loading Patch by Brian O'Neill, reviewed by brandonwilliams for CASSANDRA-4669 --- bin/cqlsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cqlsh b/bin/cqlsh index f60cfe99f5..8b8046a23f 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -2539,7 +2539,7 @@ def setup_cqlruleset(cqlmodule): def main(options, hostname, port): setup_cqlruleset(options.cqlmodule) - if os.path.exists(HISTORY) and readline is not None: + if os.path.exists(HISTORY) and readline is not None and readline.get_history_length()>0: readline.read_history_file(HISTORY) delims = readline.get_completer_delims() delims.replace("'", "")