Skip to content

Commit 8e06f91

Browse files
authored
Merge pull request #119 from postgrespro/Add_major_version_value_into_init_helper
Value pg_probackup major_version added to the class Init
2 parents 4766f93 + 5b8a836 commit 8e06f91

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

testgres/plugins/pg_probackup2/pg_probackup2/init_helpers.py

+6
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,12 @@ def __init__(self):
204204
os.environ["PGAPPNAME"] = "pg_probackup"
205205
self.delete_logs = delete_logs
206206

207+
if self.probackup_version.split('.')[0].isdigit():
208+
self.major_version = int(self.probackup_version.split('.')[0])
209+
else:
210+
print('Can\'t process pg_probackup version \"{}\": the major version is expected to be a number'.format(self.probackup_version))
211+
sys.exit(1)
212+
207213
def test_env(self):
208214
return self._test_env.copy()
209215

0 commit comments

Comments
 (0)