diff --git a/src/python/oftest/testutils.py b/src/python/oftest/testutils.py
index 76d55f8..8b0b3b6 100644
--- a/src/python/oftest/testutils.py
+++ b/src/python/oftest/testutils.py
@@ -109,9 +109,6 @@
                 scapy.TCP(sport=tcp_sport, dport=tcp_dport)
 
     pkt = pkt/("D" * (pktlen - len(pkt)))
-    
-    #print pkt.show()
-    #print scapy.Ether(str(pkt)).show()
 
     return pkt
 
@@ -374,6 +371,8 @@
                                 + str(exp_pkt).encode('hex'))
             logging.debug("Received len " + str(len(rcv_pkt)) + ": "
                                 + str(rcv_pkt).encode('hex'))
+            logging.debug("Expected packet: " + inspect_packet(scapy.Ether(str(exp_pkt))))
+            logging.debug("Received packet: " + inspect_packet(scapy.Ether(str(rcv_pkt))))
         parent.assertEqual(str(exp_pkt), str(rcv_pkt),
                            "Packet match error on port " + str(check_port))
 
@@ -902,3 +901,20 @@
 def format_packet(pkt):
     return "Packet length %d \n%s" % (len(str(pkt)), 
                                       hex_dump_buffer(str(pkt)))
+
+def inspect_packet(pkt):
+    """
+    Wrapper around scapy's show() method.
+    @returns A string showing the dissected packet.
+    """
+    from cStringIO import StringIO
+    out = None
+    backup = sys.stdout
+    try:
+        sys.stdout = StringIO()
+        pkt.show2()
+        out = sys.stdout.getvalue()
+        sys.stdout.close()
+    finally:
+        sys.stdout = backup
+    return out
diff --git a/tests/pktact.py b/tests/pktact.py
index 97c5113..25ea9cd 100644
--- a/tests/pktact.py
+++ b/tests/pktact.py
@@ -1991,16 +1991,6 @@
         # - VLAN?
         # - action
 
-    def pktToStr(self, pkt):
-        from cStringIO import StringIO
-        backup = sys.stdout
-        sys.stdout = StringIO()
-        pkt.show2()
-        out = sys.stdout.getvalue() 
-        sys.stdout.close() 
-        sys.stdout = backup
-        return out
-
     def createMatch(self, **kwargs):
         match = ofp.ofp_match()
         match.wildcards = ofp.OFPFW_ALL
@@ -2044,7 +2034,7 @@
         logging.info("Ingress %s to egress %s" % 
                        (str(ingress_port), str(egress_port)))
         logging.info("Packet:")
-        logging.info(self.pktToStr(pkt))
+        logging.info(inspect_packet(pkt))
 
         match.in_port = ingress_port
 
@@ -2108,7 +2098,7 @@
             if str_pkt != str_rcv_pkt:
                 logging.error("Response packet does not match send packet")
                 logging.info("Response:")
-                logging.info(self.pktToStr(scapy.Ether(rcv_pkt)))
+                logging.info(inspect_packet(scapy.Ether(rcv_pkt)))
             self.assertEqual(str_pkt, str_rcv_pkt,
                              'Response packet does not match send packet')
         elif expected_result == self.RESULT_NOMATCH:
