Skip to content
This repository has been archived by the owner on Dec 19, 2022. It is now read-only.

Commit

Permalink
fix postgres version detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Kim Jahn authored and Claus-Theodor Riegg committed Jul 11, 2018
1 parent c2ea924 commit d98d56c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions helpers/postgresql.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,16 @@ def postgres_version(self):
if self.version_file_exists():
try:
with open(self.version_file) as f:
return f.read().strip()
return float(f.read().strip())
except Exception:
logger.exception('Failed to read PG_VERSION from %s', self._data_dir)
return 0

def wal_name(self):
return 'wal' if self.postgres_version >= 10 else 'xlog'
return 'wal' if self.postgres_version() >= 10 else 'xlog'

def lsn_name(self):
return 'lsn' if self.postgres_version >= 10 else 'location'
return 'lsn' if self.postgres_version() >= 10 else 'location'

def initialize(self):
if os.system("initdb %s" % self.initdb_options()) == 0:
Expand Down

0 comments on commit d98d56c

Please sign in to comment.