Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array Indexing Error, Out of Bounds #6

Open
blkdragn77 opened this issue Aug 10, 2022 · 0 comments
Open

Array Indexing Error, Out of Bounds #6

blkdragn77 opened this issue Aug 10, 2022 · 0 comments

Comments

@blkdragn77
Copy link

During execution, when attempting to determine if the database type is MySQL or MariaDB, the version line is partitioned on the separator "-MariaDB". When running this on a cluster utilizing MySQL, this command does not return the expected output as "-MariaDB" does not exist in the MySQL output of 'mysql -V'.

head, sep, tail = temp.partition('-MariaDB')

The output from this command needs to be checked before proceeding to the population of the db_version variable. If empty split using a value from the MySQL output before populating db_version.

MySQL 'mysql -V' Output:
mysql Ver 14.14 Distrib 5.7.36, for Linux (x86_64) using EditLine wrapper

Line where error occurs:
db_version = x[0] + '.' + x[1]

Error Message:
python3 version_check_base.py
Traceback (most recent call last):
File "version_check_base.py", line 277, in
main()
File "version_check_base.py", line 273, in main
version_check()
File "version_check_base.py", line 111, in version_check
db_version = x[0] + '.' + x[1]
IndexError: list index out of range

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant