1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-07-14 06:54:15 +02:00

Fix is_enterprise checking in ptrack_helpers.py

This commit is contained in:
d.lepikhova
2022-05-31 11:21:59 +05:00
parent 94fd54ab63
commit 02aef65853

View File

@ -90,17 +90,17 @@ def dir_files(base_dir):
def is_enterprise():
# pg_config --help
if os.name == 'posix':
cmd = [os.environ['PG_CONFIG'], '--help']
cmd = [os.environ['PG_CONFIG'], '--pgpro-edition']
elif os.name == 'nt':
cmd = [[os.environ['PG_CONFIG']], ['--help']]
cmd = [[os.environ['PG_CONFIG']], ['--pgpro-edition']]
p = subprocess.Popen(
cmd,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE
)
if b'postgrespro.ru' in p.communicate()[0]:
if b'enterprise' in p.communicate()[0]:
return True
else:
return False