File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -571,7 +571,7 @@ def show(
571571 backup_list .append (backup )
572572
573573 if backup_id is not None :
574- assert False , "Failed to find backup with ID: {0}" .format (backup_id )
574+ raise RuntimeError ( "Failed to find backup with ID: {0}" .format (backup_id ) )
575575
576576 return backup_list
577577 else :
@@ -629,7 +629,7 @@ def show(
629629 specific_record [name .strip ()] = var
630630
631631 if not specific_record :
632- assert False , "Failed to find backup with ID: {0}" .format (backup_id )
632+ raise RuntimeError ( "Failed to find backup with ID: {0}" .format (backup_id ) )
633633
634634 return specific_record
635635
@@ -782,8 +782,8 @@ def set_archiving(
782782 instances_json = self .show (instance = None , as_json = True , expect_error = False , as_text = True )
783783 instances_data = json .loads (instances_json )
784784 if not any (inst_data .get ('instance' ) == instance for inst_data in instances_data ):
785- assert False , "Instance '{0}' does not exist. " \
786- "Please add the instance first using add_instance() or init_pb_node()." .format (instance )
785+ raise RuntimeError ( "Instance '{0}' does not exist. " \
786+ "Please add the instance first using add_instance() or init_pb_node()." .format (instance ))
787787
788788 # parse postgresql.auto.conf
789789 options = {}
You can’t perform that action at this time.
0 commit comments