8000 Value pg_probackup major_version added to the class Init by egarbuz · Pull Request #119 · postgrespro/testgres · GitHub
[go: up one dir, main page]

Skip to content

Value pg_probackup major_version added to the class Init #119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 10, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Correction of remarks
  • Loading branch information
egarbuz committed Apr 10, 2024
commit ea05a4afc54a9ed65769921b9221afec378a6df1
4 changes: 2 additions & 2 deletions testgres/plugins/pg_probackup2/pg_probackup2/init_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,10 @@ def __init__(self):
os.environ["PGAPPNAME"] = "pg_probackup"
self.delete_logs = delete_logs

if self.probackup_version.split('.')[0].isdigit:
if self.probackup_version.split('.')[0].isdigit():
self.major_version = int(self.probackup_version.split('.')[0])
else:
print('Pg_probackup version \"{}\" is not correct!'.format(self.probackup_version))
print('Pg_probackup version \"{}\" is not correct! Expected that the major pg_probackup version should be a number.'.format(self.probackup_version))
sys.exit(1)

Copy link
Contributor

Choose a reason for hiding this comment

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

Можно более безопасные преобразования сделат, на случай если в версии что-то не то будет.Либо не скастится в int либо не будет первого элемента

def test_env(self):
Expand Down
0