Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,12 @@ def cache_pg_config_data(cmd):
return cache_pg_config_data(cmd)

# try plain name
return cache_pg_config_data("pg_config")
try:
pg_config_data = cache_pg_config_data("pg_config")
except Exception:
raise Exception(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В testgres есть свои исключения - TestgresException, InvalidOperationError.

Наверное лучше будет выкидывать InvalidOperationError, потому что TestgresException везде юзается как базовый класс и вроде в чистом виде нигде не выкидывается.

"Failed to determine how to start pg_config. Specify the path to pg_config in PG_CONFIG or the path to the Postgres directory containing it in PG_BIN, or put it into the system PATH.")
return pg_config_data


def get_pg_version2(os_ops: OsOperations, bin_dir=None):
Expand Down