Also remove a superfluous empty line in test file.

Signed-off-by: Michael Hanselmann <[email protected]>
---
 lib/opcodes.py                  |    4 ++--
 test/ganeti.opcodes_unittest.py |    1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/opcodes.py b/lib/opcodes.py
index 2fae23f..5fcb494 100644
--- a/lib/opcodes.py
+++ b/lib/opcodes.py
@@ -1348,8 +1348,8 @@ class OpInstanceMultiAlloc(OpCode):
                        type(state))
 
     if "instances" in state:
-      insts = [OpCode.LoadOpCode(inst) for inst in state["instances"]]
-      state["instances"] = insts
+      state["instances"] = map(OpCode.LoadOpCode, state["instances"])
+
     return OpCode.__setstate__(self, state)
 
   def Validate(self, set_defaults):
diff --git a/test/ganeti.opcodes_unittest.py b/test/ganeti.opcodes_unittest.py
index a5e36d2..c310ecc 100755
--- a/test/ganeti.opcodes_unittest.py
+++ b/test/ganeti.opcodes_unittest.py
@@ -297,7 +297,6 @@ class TestOpcodes(unittest.TestCase):
     self.assertEqual(op.value2, "world")
     self.assertEqual(op.debug_level, 123)
 
-
   def testOpInstanceMultiAlloc(self):
     inst = dict([(name, []) for name in 
opcodes.OpInstanceCreate.GetAllSlots()])
     inst_op = opcodes.OpInstanceCreate(**inst)
-- 
1.7.7.3

Reply via email to