From 12a29f2088efbbcdb9fd60fc7d85392a79e4afa4 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 6 Sep 2018 11:38:56 -0500 Subject: [PATCH] Tweak how postgresql version is detected pattern match didn't work for the 10.5 version --- rattail_fabric/postgresql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rattail_fabric/postgresql.py b/rattail_fabric/postgresql.py index c044dd2..ef9ba06 100644 --- a/rattail_fabric/postgresql.py +++ b/rattail_fabric/postgresql.py @@ -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))