Skip to content

Commit 9f84957

Browse files
Change function argument defaults to immutable type
Co-authored-by: Matthias Büchse <[email protected]> Signed-off-by: Markus Hentsch <[email protected]>
1 parent d637f58 commit 9f84957

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Tests/iaas/volume-backup/volume-backup-tester.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)