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 1
1
import mamonsu .lib .platform as platform
2
2
from distutils .version import LooseVersion
3
- from connection import Connection , ConnectionInfo
3
+ from . connection import Connection , ConnectionInfo
4
4
5
5
6
6
class Pool (object ):
@@ -127,9 +127,13 @@ def is_pgpro_ee(self, db=None):
127
127
return False
128
128
if db in self ._cache ['pgproee' ]:
129
129
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
133
137
return self ._cache ['pgproee' ][db ]
134
138
135
139
def extension_installed (self , ext , db = None ):
You can’t perform that action at this time.
0 commit comments