Skip to content

Commit 53031b6

Browse files
committed
Fix pgpro_edition() call
1 parent dc8be06 commit 53031b6

File tree

1 file changed

+5
-3
lines changed
  • mamonsu/plugins/pgsql/driver

1 file changed

+5
-3
lines changed

mamonsu/plugins/pgsql/driver/pool.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,11 @@ def is_pgpro_ee(self, db=None):
127127
return False
128128
if db in self._cache['pgproee']:
129129
return self._cache['pgproee'][db]
130-
self._cache['pgproee'][db] = (
131-
self.query('select pgpro_edition()')[0][0].lower() == 'enterprise'
132-
)
130+
try:
131+
ver = self.query('select pgpro_edition()')[0][0]
132+
self._cache['pgproee'][db] = (ver.lower() == 'enterprise')
133+
except:
134+
self._cache['pgproee'][db] = False
133135
return self._cache['pgproee'][db]
134136

135137
def extension_installed(self, ext, db=None):

0 commit comments

Comments
 (0)