(self, pg_config_path)
| 543 | return 'running' |
| 544 | |
| 545 | def _run_pg_config(self, pg_config_path): |
| 546 | process = subprocess.run( |
| 547 | pg_config_path, stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
| 548 | stdout, stderr = process.stdout, process.stderr |
| 549 | |
| 550 | if process.returncode != 0: |
| 551 | raise ClusterError('pg_config exited with status {:d}: {}'.format( |
| 552 | process.returncode, stderr)) |
| 553 | else: |
| 554 | config = {} |
| 555 | |
| 556 | for line in stdout.splitlines(): |
| 557 | k, eq, v = line.decode('utf-8').partition('=') |
| 558 | if eq: |
| 559 | config[k.strip().lower()] = v.strip() |
| 560 | |
| 561 | return config |
| 562 | |
| 563 | def _find_pg_config(self, pg_config_path): |
| 564 | if pg_config_path is None: |
no test coverage detected