@@ -190,7 +190,7 @@ def cleanup(conn: openstack.connection.Connection, prefix=DEFAULT_PREFIX,
190190 """
191191
192192 def wait_for_resource (resource_type : str , resource_id : str ,
193- expected_status = [ "available" ] ) -> None :
193+ expected_status = ( "available" , ) ) -> None :
194194 seconds_waited = 0
195195 get_func = getattr (conn .block_storage , f"get_{ resource_type } " )
196196 while get_func (resource_id ).status not in expected_status :
@@ -212,7 +212,7 @@ def wait_for_resource(resource_type: str, resource_id: str,
212212 for backup in backups :
213213 if backup .name .startswith (prefix ):
214214 try :
215- wait_for_resource ("backup" , backup .id , [ "available" , "error" ] )
215+ wait_for_resource ("backup" , backup .id , expected_status = ( "available" , "error" ) )
216216 except openstack .exceptions .ResourceNotFound :
217217 # if the resource has vanished on
218218 # its own in the meantime ignore it
@@ -247,7 +247,7 @@ def wait_for_resource(resource_type: str, resource_id: str,
247247 for volume in volumes :
248248 if volume .name .startswith (prefix ):
249249 try :
250- wait_for_resource ("volume" , volume .id , [ "available" , "error" ] )
250+ wait_for_resource ("volume" , volume .id , expected_status = ( "available" , "error" ) )
251251 except openstack .exceptions .ResourceNotFound :
252252 # if the resource has vanished on
253253 # its own in the meantime ignore it
0 commit comments