@@ -148,21 +148,24 @@ def __init__(self):
148
148
[self .probackup_path , "--version" ],
149
149
stderr = subprocess .STDOUT ,
150
150
).decode ('utf-8' )
151
- self .probackup_version = re .search (r"\d+\.\d+\.\d+" ,
152
- probackup_version_output
153
- ).group (0 )
154
- compressions = re .search (r"\(compressions: ([^)]*)\)" ,
155
- probackup_version_output ).group (1 )
156
- self .probackup_compressions = {s .strip () for s in compressions .split (',' )}
151
+ match = re .search (r"\d+\.\d+\.\d+" ,
152
+ probackup_version_output )
153
+ self .probackup_version = match .group (0 ) if match else None
154
+ match = re .search (r"\(compressions: ([^)]*)\)" , probackup_version_output )
155
+ compressions = match .group (1 ) if match else None
156
+ if compressions :
157
+ self .probackup_compressions = {s .strip () for s in compressions .split (',' )}
158
+ else :
159
+ self .probackup_compressions = []
157
160
158
161
if self .probackup_old_path :
159
162
old_probackup_version_output = subprocess .check_output (
160
163
[self .probackup_old_path , "--version" ],
161
164
stderr = subprocess .STDOUT ,
162
165
).decode ('utf-8' )
163
- self . old_probackup_version = re .search (r"\d+\.\d+\.\d+" ,
164
- old_probackup_version_output
165
- ) .group (0 )
166
+ match = re .search (r"\d+\.\d+\.\d+" ,
167
+ old_probackup_version_output )
168
+ self . old_probackup_version = match .group (0 ) if match else None
166
169
167
170
self .remote = test_env .get ('PGPROBACKUP_SSH_REMOTE' , None ) == 'ON'
168
171
self .ptrack = test_env .get ('PG_PROBACKUP_PTRACK' , None ) == 'ON' and self .pg_config_version >= 110000
@@ -202,7 +205,6 @@ def __init__(self):
202
205
self .delete_logs = delete_logs
203
206
204
207
# s3 params
205
- self .s3_config_file = test_env .get ('PG_PROBACKUP_S3_CONFIG_FILE' )
206
208
self .s3_type = test_env .get ('PG_PROBACKUP_S3_TEST' )
207
209
208
210
def test_env (self ):
0 commit comments