Skip to content

Commit cce1d2a

Browse files
author
vshepard
committed
problem with get_pg_version in Homebrew
Fix issue 87
1 parent 1e2255f commit cce1d2a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

testgres/utils.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,11 @@ def get_pg_version():
179179
_params = [get_bin_path('postgres'), '--version']
180180
raw_ver = tconf.os_ops.exec_command(_params, encoding='utf-8')
181181

182+
# Remove "(Homebrew)" if present
183+
raw_ver = raw_ver.replace('(Homebrew)', '').strip()
184+
182185
# cook version of PostgreSQL
183-
version = raw_ver.strip().split(' ')[-1] \
186+
version = raw_ver.split(' ')[-1] \
184187
.partition('devel')[0] \
185188
.partition('beta')[0] \
186189
.partition('rc')[0]

0 commit comments

Comments
 (0)