mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2026-06-21 01:34:15 +02:00
Merge pull request #501 from postgrespro/enable_nls_check
Add checking enable-nls option in configure
This commit is contained in:
@@ -101,6 +101,16 @@ def is_enterprise():
|
||||
else:
|
||||
return False
|
||||
|
||||
def is_nls_enabled():
|
||||
cmd = [os.environ['PG_CONFIG'], '--configure']
|
||||
|
||||
p = subprocess.Popen(
|
||||
cmd,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE
|
||||
)
|
||||
return b'enable-nls' in p.communicate()[0]
|
||||
|
||||
|
||||
class ProbackupException(Exception):
|
||||
def __init__(self, message, cmd):
|
||||
@@ -147,6 +157,7 @@ def slow_start(self, replica=False):
|
||||
class ProbackupTest(object):
|
||||
# Class attributes
|
||||
enterprise = is_enterprise()
|
||||
enable_nls = is_nls_enabled()
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(ProbackupTest, self).__init__(*args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user