|
|
@@ -122,13 +122,13 @@ def normalize_user_scripts(user_scripts, instances):
|
|
|
selected instances for the replica/migration """
|
|
|
if user_scripts is None:
|
|
|
user_scripts = {}
|
|
|
- for instance in user_scripts.get('instances', {}).keys():
|
|
|
+ for instance in list(user_scripts.get('instances', {}).keys()):
|
|
|
if instance not in instances:
|
|
|
LOG.warn("Removing provided instance '%s' from user_scripts body "
|
|
|
"because it's not included in one of the selected "
|
|
|
"instances for this replica/migration: %s",
|
|
|
instance, instances)
|
|
|
- user_scripts.pop(instance, None)
|
|
|
+ user_scripts['instances'].pop(instance, None)
|
|
|
|
|
|
return user_scripts
|
|
|
|