You've already forked pg_probackup
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:
@ -90,17 +90,17 @@ def dir_files(base_dir):
|
|||||||
def is_enterprise():
|
def is_enterprise():
|
||||||
# pg_config --help
|
# pg_config --help
|
||||||
if os.name == 'posix':
|
if os.name == 'posix':
|
||||||
cmd = [os.environ['PG_CONFIG'], '--help']
|
cmd = [os.environ['PG_CONFIG'], '--pgpro-edition']
|
||||||
|
|
||||||
elif os.name == 'nt':
|
elif os.name == 'nt':
|
||||||
cmd = [[os.environ['PG_CONFIG']], ['--help']]
|
cmd = [[os.environ['PG_CONFIG']], ['--pgpro-edition']]
|
||||||
|
|
||||||
p = subprocess.Popen(
|
p = subprocess.Popen(
|
||||||
cmd,
|
cmd,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.PIPE
|
stderr=subprocess.PIPE
|
||||||
)
|
)
|
||||||
if b'postgrespro.ru' in p.communicate()[0]:
|
if b'enterprise' in p.communicate()[0]:
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
Reference in New Issue
Block a user