Tweak how postgresql version is detected
pattern match didn't work for the 10.5 version
This commit is contained in:
parent
190a8318cc
commit
12a29f2088
|
@ -47,7 +47,7 @@ def get_version():
|
|||
"""
|
||||
result = sudo('psql --version')
|
||||
if result.succeeded:
|
||||
match = re.match(r'^psql \(PostgreSQL\) (\d+\.\d+)\.\d+', result)
|
||||
match = re.match(r'^psql \(PostgreSQL\) (\d+\.\d+)(?:\.\d+)?', result)
|
||||
if match:
|
||||
return float(match.group(1))
|
||||
|
||||
|
|
Loading…
Reference in a new issue