Found with pylint. This needs to be verified by original author of method, olichtne.
Probably method get_id should be called on the master inferface,
which is accessed by self._master['primary'] and not by self._master
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
---
lnst/Controller/Machine.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lnst/Controller/Machine.py b/lnst/Controller/Machine.py
index 8da1a10..1671e52 100644
--- a/lnst/Controller/Machine.py
+++ b/lnst/Controller/Machine.py
@@ -553,7 +553,7 @@ class Interface(object):
def add_master(self, master, primary=True):
if primary and self._master["primary"] != None:
msg = "Interface %s already has a primary master."\
- % self._master.get_id()
+ % self._master["primary"].get_id()
raise MachineError(msg)
else:
if primary:
--
2.1.0