subordinate_configuration in the interface expects a dict

When a subordinate charm doesn't provide an explicit value for the
optional "subordinate_configuration" arg, the error "TypeError: argument
of type 'NoneType' is not iterable" happends. Because the principal
charm expects it as a dict as documented in the interface. So let's use
a empty dict as the fallback value.

Change-Id: Ib8456ab32ec8ee5bee160d0b38a61b7ee43e16ca
Closes-Bug: #1803040
This commit is contained in:
Nobuto Murata 2018-11-06 14:48:02 +09:00
parent fcf04868ab
commit 46e001d36c

View File

@ -54,6 +54,8 @@ class NeutronPluginAPISubordinate(RelationBase):
# }
# }
"""
if subordinate_configuration is None:
subordinate_configuration = {}
conversation = self.conversation()
relation_info = {
'neutron-plugin': neutron_plugin,