Bugfix in InterfacesDef __init__ function

Fixes a small bug in the __init__ function of the InterfacesDef class when node_template is None.

Change-Id: I6999531d04ee9548943311c3ba6cb73cbb89169f
This commit is contained in:
Miguel Caballer 2017-01-10 09:11:57 +01:00
parent 5d1647d5f5
commit f0b547a3a9
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ class InterfacesDef(StatefulEntityType):
and interfacetype in self.ntype.interfaces:
interfacetype = self.ntype.interfaces[interfacetype]['type']
if node_type:
if self.node_template.custom_def \
if self.node_template and self.node_template.custom_def \
and interfacetype in self.node_template.custom_def:
self.defs = self.node_template.custom_def[interfacetype]
else: