cqlsh: check for non-empty history file before loading

Patch by Brian O'Neill, reviewed by brandonwilliams for CASSANDRA-4669
This commit is contained in:
Brandon Williams 2012-09-14 16:42:54 -05:00
parent 398b1d2633
commit a500e28357
1 changed files with 1 additions and 1 deletions

View File

@ -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("'", "")