Skip to content

Commit 33983a6

Browse files
committed
update_spawner_attributes, allow set non-existing attribute on spawner object
1 parent 2463d2b commit 33983a6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ldap_hooks/hooks.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,8 +397,10 @@ def update_spawner_attributes(spawner, spawner_attributes):
397397
attr = getattr(spawner, spawner_attr)
398398
if isinstance(attr, dict):
399399
attr.update(spawner_value)
400-
if isinstance(attr, list) or isinstance(attr, str):
400+
if isinstance(attr, (list, set, tuple, str)):
401401
setattr(spawner, spawner_attr, spawner_value)
402+
else:
403+
setattr(spawner, spawner_attr, spawner_value)
402404

403405

404406
@gen.coroutine

0 commit comments

Comments
 (0)