RemoteDevice initialized it's netns attribute to None. Therefore, it's possible that it is still None when the DeviceResult intances access it.
Signed-off-by: Adrian Moreno amorenoz@redhat.com --- lnst/Controller/RecipeResults.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lnst/Controller/RecipeResults.py b/lnst/Controller/RecipeResults.py index dac609a..38a4170 100644 --- a/lnst/Controller/RecipeResults.py +++ b/lnst/Controller/RecipeResults.py @@ -129,7 +129,7 @@ class DeviceCreateResult(DeviceConfigResult): return "Creating Device {hostid}{netns}.{dev_id} = {cls_name}({args}{comma}{kwargs})".format( hostid=self.device.host.hostid, netns=".{}".format(self.device.netns.name) - if self.device.netns.name + if self.device.netns and self.device.netns.name else "", dev_id=self.device._id, cls_name=dev_clsname, @@ -166,7 +166,7 @@ class DeviceMethodCallResult(DeviceConfigResult): host=self.device.host.hostid, netns=( ".{}".format(self.device.netns.name) - if self.device.netns.name + if self.device.netns and self.device.netns.name else "" ), dev_id=self.device._id, @@ -204,7 +204,7 @@ class DeviceAttrSetResult(DeviceConfigResult): host=self.device.host.hostid, netns=( ".{}".format(self.device.netns.name) - if self.device.netns.name + if self.device.netns and self.device.netns.name else "" ), dev_id=self.device._id,