I have this simple try-except
code:
self.tf.router.EchoProg(state=1)
try:
print "\tCheckTestFirmwareCommunication_SetPort: "
print self.tf.DUT.CheckTestFirmwareCommunication_SetPort()
except NoResponseException, e:
print "\tCheckTestFirmwareCommunication_SetPort: ", repr(e)
self.tf.router.EchoProg(state=0)
Output with Exception:
CheckTestFirmwareCommunication_SetPort:
CheckTestFirmwareCommunication_SetPort: DD_NoResponseException()
Questions:
Can someone explain why i still see the print statements even if i get an exception?
Is it possible to ignore print statements if the
try-except
catch an exception?