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

bin/cqlsh writes unwanted output to stderr while validating python version if python 2.6 is installed as system python

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Normal
    • Resolution: Duplicate
    • Fix Version/s: 4.0-rc1, 4.0
    • Component/s: Tool/cqlsh
    • Labels:
      None
    • Change Category:
      Operability
    • Complexity:
      Low Hanging Fruit
    • Platform:
      All
    • Impacts:
      None

      Description

      The cqlsh.py script requires Python >= 2.7 on Cassandra 4.0 and checks to make sure it’s a supported version, looking for alternate python versions if the default is 2.6. Unfortunately the check writes output to stderr that may confuse some users/tools consuming it.

      python -c 'import os; print('\''{}.{}'\''.format(os.sys.version_info.major, os.sys.version_info.minor))'
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
      AttributeError: 'tuple' object has no attribute 'major'
      

      The output adds no value and can be suppressed by redirecting to /dev/null

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jmeredithco Jon Meredith
                Reporter:
                jmeredithco Jon Meredith
                Authors:
                Jon Meredith
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: