Skip to content

Commit

Permalink
#93 fix suffix parsing (#96) (#98)
Browse files Browse the repository at this point in the history
* #93 fix suffix parsing

* complete changelog fragment
  • Loading branch information
markuman authored Apr 21, 2022
1 parent 2d7082e commit 75f85fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- module_utils/mysql.py - Proxysql version suffix may not be an integer (https://github.com/ansible-collections/community.proxysql/pull/96).
5 changes: 3 additions & 2 deletions plugins/module_utils/mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,16 @@ def _version(cursor):
res = cursor.fetchone()

# 2.2.0-72-ge14accd
raw_version = res.get('version()').split('-')
# 2.3.2-percona-1.1
raw_version = res.get('version()').split('-', 1)
_version = raw_version[0].split('.')

version = dict()
version['full'] = res.get('version()')
version['major'] = int(_version[0])
version['minor'] = int(_version[1])
version['release'] = int(_version[2])
version['suffix'] = int(raw_version[1])
version['suffix'] = raw_version[1]

return version

Expand Down

0 comments on commit 75f85fb

Please sign in to comment.