Skip to content

Commit a6a976d

Browse files
authored
#93 fix suffix parsing (#96)
* #93 fix suffix parsing * complete changelog fragment
1 parent 2ddff09 commit a6a976d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
bugfixes:
2+
- module_utils/mysql.py - Proxysql version suffix may not be an integer (https://github.com/ansible-collections/community.proxysql/pull/96).

plugins/module_utils/mysql.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,16 @@ def _version(cursor):
4545
res = cursor.fetchone()
4646

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

5152
version = dict()
5253
version['full'] = res.get('version()')
5354
version['major'] = int(_version[0])
5455
version['minor'] = int(_version[1])
5556
version['release'] = int(_version[2])
56-
version['suffix'] = int(raw_version[1])
57+
version['suffix'] = raw_version[1]
5758

5859
return version
5960

0 commit comments

Comments
 (0)