Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-4669

Empty .cqlsh_history file causes cqlsh to crash on startup.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Low
    • Resolution: Fixed
    • Fix Version/s: 1.1.6
    • Component/s: Legacy/Tools
    • Labels:
      None
    • Environment:

      Python 2.7.1 on Mac OSX

    • Severity:
      Low

      Description

      Not sure how I got it, but I ended up with an empty .cqlsh_history file. In that state, when starting cqlsh, you end up with:

      bone@zen:~/dev/boneill42/cassandra-> bin/cqlsh
      Traceback (most recent call last):
      File "bin/cqlsh", line 2588, in <module>
      main(*read_options(sys.argv[1:], os.environ))
      File "bin/cqlsh", line 2543, in main
      readline.read_history_file(HISTORY)
      IOError: [Errno 22] Invalid argument

      Its a simple fix to check for a non-empty history file. I'll attach the patch.

        Attachments

        1. trunk-4669.txt
          0.5 kB
          Brian ONeill
        2. fix-cqlsh-history.patch
          2 kB
          Aleksey Yeschenko

          Activity

            People

            • Assignee:
              boneill Brian ONeill
              Reporter:
              boneill Brian ONeill
              Authors:
              Brian ONeill
              Reviewers:
              Brandon Williams
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: