File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed
Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -332,22 +332,22 @@ def main():
332332 cloud ,
333333 password = getpass .getpass ("Enter password: " ) if args .ask else None
334334 )
335+
336+ if not cleanup (conn , prefix = args .prefix , timeout = args .timeout ):
337+ raise Exception (
338+ f"Cleanup was not successful, there may be leftover resources "
339+ f"with the '{ args .prefix } ' prefix"
340+ )
335341 if args .cleanup_only :
342+ return
343+ try :
344+ test_backup (conn , prefix = args .prefix , timeout = args .timeout )
345+ finally :
336346 if not cleanup (conn , prefix = args .prefix , timeout = args .timeout ):
337- raise Exception (
338- f"Cleanup was not successful, there may be leftover resources "
339- f"with the '{ args .prefix } ' prefix"
347+ logging . info (
348+ f"There may be leftover resources with the "
349+ f"'{ args .prefix } ' prefix that could not be cleaned up! "
340350 )
341- else :
342- cleanup (conn , prefix = args .prefix , timeout = args .timeout )
343- try :
344- test_backup (conn , prefix = args .prefix , timeout = args .timeout )
345- finally :
346- if not cleanup (conn , prefix = args .prefix , timeout = args .timeout ):
347- logging .info (
348- f"There may be leftover resources with the "
349- f"'{ args .prefix } ' prefix that could not be cleaned up!"
350- )
351351
352352
353353if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments