File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
mamonsu/plugins/pgsql/driver Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 11import mamonsu .lib .platform as platform
22from distutils .version import LooseVersion
3- from connection import Connection , ConnectionInfo
3+ from . connection import Connection , ConnectionInfo
44
55
66class Pool (object ):
@@ -127,9 +127,13 @@ 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+ ed = self .query ('select pgpro_edition()' )[0 ][0 ]
132+ self ._connections [db ].log .info ('pgpro_edition is {}' .format (ed ))
133+ self ._cache ['pgproee' ][db ] = (ed .lower () == 'enterprise' )
134+ except :
135+ self ._connections [db ].log .info ('pgpro_edition() is not defined' )
136+ self ._cache ['pgproee' ][db ] = False
133137 return self ._cache ['pgproee' ][db ]
134138
135139 def extension_installed (self , ext , db = None ):
You can’t perform that action at this time.
0 commit comments