Revision f1048938 lib/mcpu.py

b/lib/mcpu.py
90 90
    opcodes.OpTestAllocator: cmdlib.LUTestAllocator,
91 91
    }
92 92

  
93
  def __init__(self, context, feedback=None):
93
  def __init__(self, context):
94 94
    """Constructor for Processor
95 95

  
96 96
    Args:
......
98 98
                    interesting events are happening
99 99
    """
100 100
    self.context = context
101
    self._feedback_fn = feedback
101
    self._feedback_fn = None
102 102
    self.exclusive_BGL = False
103 103

  
104 104
  def _ExecLU(self, lu):
......
146 146

  
147 147
    return result
148 148

  
149
  def ExecOpCode(self, op):
149
  def ExecOpCode(self, op, feedback_fn):
150 150
    """Execute an opcode.
151 151

  
152 152
    Args:
......
157 157
      raise errors.ProgrammerError("Non-opcode instance passed"
158 158
                                   " to ExecOpcode")
159 159

  
160
    self._feedback_fn = feedback_fn
160 161
    lu_class = self.DISPATCH_TABLE.get(op.__class__, None)
161 162
    if lu_class is None:
162 163
      raise errors.OpCodeUnknown("Unknown opcode")

Also available in: Unified diff