Calling required/unimplemented methods fails

Bug #428548 reported by Iain Lowe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
VMBuilder
Fix Committed
Low
Iain Lowe

Bug Description

Calling required methods on "interfaces" in distro.py, hypervisor.py and suite.py fails on a call to NotImplemented with stack trace:

Traceback (most recent call last):
  File "/home/ilowe/work/vmbuilder-trunk/test/hypervisor_tests.py", line 7, in test_defaultFinalizeRaisesNotImplemented
    self.assertRaises(NotImplemented, h.finalize)
  File "/usr/lib/python2.6/unittest.py", line 336, in failUnlessRaises
    callableObj(*args, **kwargs)
  File "/home/ilowe/work/vmbuilder-trunk/VMBuilder/hypervisor.py", line 28, in finalize
    raise NotImplemented('Hypervisor subclasses need to implement the finalize method')
TypeError: 'NotImplementedType' object is not callable

Related branches

Iain Lowe (ilowe)
Changed in vmbuilder:
assignee: nobody → Iain Lowe (ilowe)
status: New → In Progress
Revision history for this message
Iain Lowe (ilowe) wrote :

The attached branch fixes this issue by calling NotImplementedError instead of NotImplemented; I did this in order to preserve the exception messages. They're not strictly required though. Eventually, we should probably just raise NotImplemented instead of building custom exception messages.

Changed in vmbuilder:
status: In Progress → Fix Committed
Revision history for this message
Soren Hansen (soren) wrote :

I agree with the change, but cannot merge your branch as is, as it's branched off of another branch that has not yet been approved, so merging this branch will force me to also merge the other one.

Soren Hansen (soren)
Changed in vmbuilder:
importance: Undecided → Low
Soren Hansen (soren)
Changed in vmbuilder:
status: Fix Committed → Fix Released
status: Fix Released → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.