diff --git a/src/python/oftest/controller.py b/src/python/oftest/controller.py
index b60823a..fa346c3 100644
--- a/src/python/oftest/controller.py
+++ b/src/python/oftest/controller.py
@@ -258,8 +258,7 @@
                         rep = echo_reply()
                         rep.header.xid = hdr.xid
                         # Ignoring additional data
-                        if self.message_send(rep.pack(), zero_xid=True) < 0:
-                            self.logger.error("Error sending echo reply")
+                        self.message_send(rep.pack(), zero_xid=True)
                         continue
 
                 # Now check for message handlers; preference is given to
@@ -613,10 +612,7 @@
 
             self.xid = msg.header.xid
             self.xid_response = None
-            if self.message_send(msg.pack()) < 0:
-                self.logger.error("Error sending pkt for transaction %d" %
-                                  msg.header.xid)
-                return (None, None)
+            self.message_send(msg.pack())
 
             self.logger.debug("Waiting for transaction %d" % msg.header.xid)
             timed_wait(self.xid_cv, lambda: self.xid_response, timeout=timeout)
@@ -641,9 +637,6 @@
         the XID in the header is 0, then an XID will be generated
         for the message.  Set zero_xid to override this behavior (and keep an
         existing 0 xid)
-
-        @return 0 on success
-
         """
 
         if not self.switch_socket:
@@ -663,9 +656,9 @@
                           ofp_type_map.get(msg_type, "unknown (%d)" % msg_type),
                           msg_len)
         if self.switch_socket.sendall(outpkt) is not None:
-            raise Exception("unknown error on sendall")
+            raise AssertionError("failed to send message to switch")
 
-        return 0
+        return 0 # for backwards compatibility
 
     def __str__(self):
         string = "Controller:\n"
diff --git a/src/python/oftest/testutils.py b/src/python/oftest/testutils.py
index de7b52a..0fc6ce0 100644
--- a/src/python/oftest/testutils.py
+++ b/src/python/oftest/testutils.py
@@ -43,7 +43,8 @@
     msg.out_port = ofp.OFPP_NONE
     msg.command = ofp.OFPFC_DELETE
     msg.buffer_id = 0xffffffff
-    return ctrl.message_send(msg)
+    ctrl.message_send(msg)
+    return 0
 
 def required_wildcards(parent):
     w = test_param_get('required_wildcards', default='default')
@@ -349,8 +350,8 @@
     mod.config = config
     mod.mask = mask
     mod.advertise = reply.ports[idx].advertised
-    rv = controller.message_send(mod)
-    return rv
+    controller.message_send(mod)
+    return 0
 
 def receive_pkt_check(dp, pkt, yes_ports, no_ports, assert_if):
     """
@@ -574,8 +575,7 @@
         parent.assertEqual(rc, 0, "Failed to delete all flows")
 
     logging.debug("Insert flow")
-    rv = parent.controller.message_send(request)
-    parent.assertTrue(rv != -1, "Error installing flow mod")
+    parent.controller.message_send(request)
 
     parent.assertEqual(do_barrier(parent.controller), 0, "Barrier failed")
 
@@ -642,8 +642,7 @@
             msg.actions.add(act)
 
     logging.debug(msg.show())
-    rv = parent.controller.message_send(msg)
-    parent.assertTrue(rv == 0, "Error sending out message")
+    parent.controller.message_send(msg)
 
     if exp_pkt is None:
         exp_pkt = pkt
diff --git a/tests/FuncUtils.py b/tests/FuncUtils.py
index 4d420da..ad1b1ea 100644
--- a/tests/FuncUtils.py
+++ b/tests/FuncUtils.py
@@ -41,8 +41,7 @@
     act.port = of_ports[1]
     msg.actions.add(act)
 
-    rv = self.controller.message_send(msg)
-    self.assertTrue(rv != -1, "Error installing flow mod")
+    self.controller.message_send(msg)
     self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
     return (pkt_exactflow,match)
@@ -69,8 +68,7 @@
     act.port = of_ports[2]
     msg.actions.add(act)
 
-    rv = self.controller.message_send(msg)
-    self.assertTrue(rv != -1, "Error installing flow mod")
+    self.controller.message_send(msg)
     self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
     return (pkt_exactflow,match)         
@@ -98,8 +96,7 @@
     act1.port = of_ports[1]
     msg1.actions.add(act1)
 
-    rv = self.controller.message_send(msg1)
-    self.assertTrue(rv != -1, "Error installing flow mod")
+    self.controller.message_send(msg1)
     self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
     return (pkt_wildcardsrc,match1)
@@ -126,8 +123,7 @@
     act.port = of_ports[1]
     msg.actions.add(act)
 
-    rv = self.controller.message_send(msg)
-    self.assertTrue(rv != -1, "Error installing flow mod")
+    self.controller.message_send(msg)
     self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
     return (pkt_MatchSrc,match)
@@ -153,8 +149,7 @@
     act.port = of_ports[1]
     msg.actions.add(act)
 
-    rv = self.controller.message_send(msg)
-    self.assertTrue(rv != -1, "Error installing flow mod")
+    self.controller.message_send(msg)
     self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
     return (pkt_matchdst,match)
@@ -180,8 +175,7 @@
     if priority != None :
         msg2.priority = priority
 
-    rv = self.controller.message_send(msg2)
-    self.assertTrue(rv != -1, "Error installing flow mod")
+    self.controller.message_send(msg2)
     self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
     return (pkt_wildcard,match2)
@@ -214,8 +208,7 @@
     if priority != None :
         msg3.priority = priority
 
-    rv = self.controller.message_send(msg3)
-    self.assertTrue(rv != -1, "Error installing flow mod")
+    self.controller.message_send(msg3)
     self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
     return (pkt_matchingress,match3)
@@ -247,8 +240,7 @@
     if priority != None :
         msg3.priority = priority
 
-    rv = self.controller.message_send(msg3)
-    self.assertTrue(rv != -1, "Error installing flow mod")
+    self.controller.message_send(msg3)
     self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
     return (pkt_matchingress,match3)
@@ -275,8 +267,7 @@
     act.port = of_ports[1]
     msg.actions.add(act)
 
-    rv = self.controller.message_send(msg)
-    self.assertTrue(rv != -1, "Error installing flow mod")
+    self.controller.message_send(msg)
     self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
     return (pkt_matchvlanid,match)
@@ -302,8 +293,7 @@
     act.port = of_ports[1]
     msg.actions.add(act)
 
-    rv = self.controller.message_send(msg)
-    self.assertTrue(rv != -1, "Error installing flow mod")
+    self.controller.message_send(msg)
     self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
     return (pkt_matchvlanpcp,match)
@@ -330,8 +320,7 @@
     act.port = of_ports[1]
     msg.actions.add(act)
 
-    rv = self.controller.message_send(msg)
-    self.assertTrue(rv != -1, "Error installing flow mod")
+    self.controller.message_send(msg)
     self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
     return (pkt_mulL2,match)
@@ -357,8 +346,7 @@
     act.port = of_ports[1]
     msg.actions.add(act)
 
-    rv = self.controller.message_send(msg)
-    self.assertTrue(rv != -1, "Error installing flow mod")
+    self.controller.message_send(msg)
     self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
     return (pkt_mulL4,match)  
@@ -383,8 +371,7 @@
     act.port = of_ports[1]
     msg.actions.add(act)
 
-    rv = self.controller.message_send(msg)
-    self.assertTrue(rv != -1, "Error installing flow mod")
+    self.controller.message_send(msg)
     self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
     return (pkt_iptos,match)
@@ -409,8 +396,7 @@
     act.port = of_ports[1]
     msg.actions.add(act)
 
-    rv = self.controller.message_send(msg)
-    self.assertTrue(rv != -1, "Error installing flow mod")
+    self.controller.message_send(msg)
     self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
     return (pkt_iptos,match)
@@ -437,8 +423,7 @@
     act.port = of_ports[1]
     msg.actions.add(act)
 
-    rv = self.controller.message_send(msg)
-    self.assertTrue(rv != -1, "Error installing flow mod")
+    self.controller.message_send(msg)
     self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
     return (pkt_matchtSrc,match)  
@@ -463,8 +448,7 @@
     act.port = of_ports[1]
     msg.actions.add(act)
 
-    rv = self.controller.message_send(msg)
-    self.assertTrue(rv != -1, "Error installing flow mod")
+    self.controller.message_send(msg)
     self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
     return (pkt_matchdst,match)        
@@ -491,8 +475,7 @@
     act.port = of_ports[1]
     msg.actions.add(act)
 
-    rv = self.controller.message_send(msg)
-    self.assertTrue(rv != -1, "Error installing flow mod")
+    self.controller.message_send(msg)
     self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
     return (pkt_matchtype,match)
 
@@ -516,8 +499,7 @@
         msg5.priority = priority
 
     # Send the flow with action A'
-    rv = self.controller.message_send (msg5)
-    self.assertTrue(rv != -1, "Error installing flow mod")
+    self.controller.message_send (msg5)
     self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
 def modify_flow_action(self,of_ports,match,priority=None):
@@ -539,8 +521,7 @@
         msg8.priority = priority
 
     # Send the flow with action A'
-    rv = self.controller.message_send (msg8)
-    self.assertTrue(rv != -1, "Error installing flow mod")
+    self.controller.message_send (msg8)
     self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
 def enqueue(self,ingress_port,egress_port,egress_queue_id):
@@ -562,8 +543,7 @@
     request.actions.add(act)
     
     logging.info("Inserting flow")
-    rv = self.controller.message_send(request)
-    self.assertTrue(rv != -1, "Error installing flow mod")
+    self.controller.message_send(request)
     self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
     return (pkt,match)
 
@@ -834,8 +814,7 @@
 
     if priority != None :
         msg4.priority = priority
-    rv = self.controller.message_send(msg4)
-    self.assertTrue(rv!= -1, "Error installing flow mod")
+    self.controller.message_send(msg4)
     self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
 
@@ -853,8 +832,7 @@
     if priority != None :
         msg6.priority = priority
 
-    rv = self.controller.message_send(msg6)
-    self.assertTrue(rv != -1, "Error installing flow mod")
+    self.controller.message_send(msg6)
     self.assertEqual(do_barrier(self.controller),0, "Barrier failed")
 
 
diff --git a/tests/actions.py b/tests/actions.py
index 330068c..62afda8 100644
--- a/tests/actions.py
+++ b/tests/actions.py
@@ -57,8 +57,7 @@
         msg.command = ofp.OFPFC_ADD
         msg.buffer_id = 0xffffffff
         msg.match = match
-        rv = self.controller.message_send(msg)
-        self.assertTrue(rv != -1, "Error installing flow mod")
+        self.controller.message_send(msg)
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
         #Sending N packets matching the flow inserted
@@ -163,8 +162,7 @@
         request.actions.add(act)
         
         logging.info("Inserting flow")
-        rv = self.controller.message_send(request)
-        self.assertTrue(rv != -1, "Error installing flow mod")
+        self.controller.message_send(request)
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
         #Send Packet matching the flow
@@ -217,8 +215,7 @@
             request.actions.add(act)
 
             logging.info("Inserting flow")
-            rv = self.controller.message_send(request)
-            self.assertTrue(rv != -1, "Error installing flow mod")
+            self.controller.message_send(request)
             self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
             
             #Send packet matching the flow
@@ -271,8 +268,7 @@
             request.actions.add(act)
 
             logging.info("Inserting flow")
-            rv = self.controller.message_send(request)
-            self.assertTrue(rv != -1, "Error installing flow mod")
+            self.controller.message_send(request)
             self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
             #Send packet matching the flow
@@ -323,8 +319,7 @@
         request.actions.add(act)
         
         logging.info("Inserting flow")
-        rv = self.controller.message_send(request)
-        self.assertTrue(rv != -1, "Error installing flow mod")
+        self.controller.message_send(request)
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
         #Send Packet matching the flow
@@ -375,8 +370,7 @@
             
         request.actions.add(act)
         logging.info("Inserting flow")
-        rv = self.controller.message_send(request)
-        self.assertTrue(rv != -1, "Error installing flow mod")
+        self.controller.message_send(request)
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
         #Send packet matching the flow
@@ -420,8 +414,7 @@
         act = action.action_output()
         act.port = ofp.OFPP_TABLE
         pkt_out.actions.add(act)
-        rv = self.controller.message_send(pkt_out)
-        self.assertTrue(rv == 0, "Error sending out message")
+        self.controller.message_send(pkt_out)
 
         #Verifying packet out message recieved on the expected dataplane port. 
         (of_port, pkt, pkt_time) = self.dataplane.poll(port_number=of_ports[1],
diff --git a/tests/basic.py b/tests/basic.py
index 84c4d63..06d4304 100644
--- a/tests/basic.py
+++ b/tests/basic.py
@@ -215,8 +215,7 @@
                msg.actions.add(act)
 
                logging.info("PacketOut to: " + str(dp_port))
-               rv = self.controller.message_send(msg)
-               self.assertTrue(rv == 0, "Error sending out message")
+               self.controller.message_send(msg)
 
                exp_pkt_arg = None
                exp_port = None
@@ -273,8 +272,7 @@
                   msg.actions.add(act)
 
                logging.info("PacketOut to: " + str(dp_ports))
-               rv = self.controller.message_send(msg)
-               self.assertTrue(rv == 0, "Error sending out message")
+               self.controller.message_send(msg)
 
                receive_pkt_check(self.dataplane, outpkt, dp_ports,
                                  set(of_ports).difference(dp_ports),
@@ -293,8 +291,7 @@
         logging.info("Running StatsGet")
         logging.info("Inserting trial flow")
         request = flow_mod_gen(config["port_map"], True)
-        rv = self.controller.message_send(request)
-        self.assertTrue(rv != -1, "Failed to insert test flow")
+        self.controller.message_send(request)
         
         logging.info("Sending flow request")
         request = message.flow_stats_request()
@@ -316,8 +313,7 @@
         logging.info("Running TableStatsGet")
         logging.info("Inserting trial flow")
         request = flow_mod_gen(config["port_map"], True)
-        rv = self.controller.message_send(request)
-        self.assertTrue(rv != -1, "Failed to insert test flow")
+        self.controller.message_send(request)
         
         logging.info("Sending table stats request")
         request = message.table_stats_request()
@@ -352,8 +348,7 @@
     def runTest(self):
         logging.info("Running " + str(self))
         request = flow_mod_gen(config["port_map"], True)
-        rv = self.controller.message_send(request)
-        self.assertTrue(rv != -1, "Error installing flow mod")
+        self.controller.message_send(request)
 
 class PortConfigMod(base_tests.SimpleProtocol):
     """
diff --git a/tests/bsn_ipmask.py b/tests/bsn_ipmask.py
index 70ca990..51f2213 100644
--- a/tests/bsn_ipmask.py
+++ b/tests/bsn_ipmask.py
@@ -52,8 +52,7 @@
         m = message.vendor()
         m.vendor = 0x005c16c7
         m.data = struct.pack("!LBBBBL", 0, index, 0, 0, 0, mask)
-        rc = self.controller.message_send(m)
-        self.assertNotEqual(rc, -1, "Error sending set IP mask command")
+        self.controller.message_send(m)
 
     def bsn_get_ip_mask(self, index):
         """
@@ -63,8 +62,7 @@
         m = message.vendor()
         m.vendor = 0x005c16c7
         m.data = struct.pack( "!LBBBBL", 1, index, 0, 0, 0, 0 )
-        rc = self.controller.message_send(m)
-        self.assertNotEqual(rc, -1, "Error sending get IP mask command")
+        self.controller.message_send(m)
         m, r = self.controller.poll(ofp.OFPT_VENDOR)
         self.assertEqual(m.vendor, 0x005c16c7, "Wrong vendor ID")
         x = struct.unpack("!LBBBBL", m.data)
@@ -149,14 +147,12 @@
         rc = delete_all_flows(self.controller)
         self.assertEqual(rc, 0, "Failed to delete all flows")
 
-        rc = self.controller.message_send(flow_msg_create(
+        self.controller.message_send(flow_msg_create(
               self, pkt0, ing_port=ports[0], egr_ports=[ports[1]],
               wildcards=wildcards))
-        self.assertNotEqual(rc, -1, "Error inserting flow entry 0")
-        rc = self.controller.message_send(flow_msg_create(
+        self.controller.message_send(flow_msg_create(
               self, pkt1, ing_port=ports[0], egr_ports=[ports[2]],
               wildcards=wildcards))
-        self.assertNotEqual(rc, -1, "Error inserting flow entry 1")
 
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
             
diff --git a/tests/bsn_mirror.py b/tests/bsn_mirror.py
index fd211c8..8a713be 100644
--- a/tests/bsn_mirror.py
+++ b/tests/bsn_mirror.py
@@ -91,8 +91,7 @@
         m = message.vendor()
         m.vendor = 0x005c16c7
         m.data = struct.pack("!LBBBB", 3, enabled, 0, 0, 0)
-        rc = self.controller.message_send(m)
-        self.assertNotEqual(rc, -1, "Error sending set mirroring command")
+        self.controller.message_send(m)
 
     def bsn_get_mirroring(self):
         """
@@ -102,8 +101,7 @@
         m = message.vendor()
         m.vendor = 0x005c16c7
         m.data = struct.pack("!LBBBB", 4, 0, 0, 0, 0)
-        rc = self.controller.message_send(m)
-        self.assertNotEqual(rc, -1, "Error sending get mirroring command")
+        self.controller.message_send(m)
         m, r = self.controller.poll(ofp.OFPT_VENDOR, 2)
         self.assertEqual(m.vendor, 0x005c16c7, "Wrong vendor ID")
         x = struct.unpack("!LBBBB", m.data)
@@ -154,8 +152,7 @@
         flow_mod.actions.add(act3)
         self.assertEqual(delete_all_flows(self.controller), 0,
                          "Failed to delete all flows")
-        self.assertNotEqual(self.controller.message_send(flow_mod), -1,
-                            "Error installing flow mod")
+        self.controller.message_send(flow_mod)
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
         
         logging.info("Sending packet to port %s" % ports[0])
diff --git a/tests/caps.py b/tests/caps.py
index 6c48840..9f80d4b 100644
--- a/tests/caps.py
+++ b/tests/caps.py
@@ -58,8 +58,7 @@
 
     # Make sure we can install at least one flow
     logging.info("Inserting initial flow")
-    rv = obj.controller.message_send(request)
-    obj.assertTrue(rv != -1, "Error installing flow mod")
+    obj.controller.message_send(request)
     obj.assertEqual(do_barrier(obj.controller, timeout=10), 0, "Barrier failed")
     flow_count = 1
 
@@ -68,7 +67,7 @@
 
     while True:
         request.match.nw_src += 1
-        rv = obj.controller.message_send(request)
+        obj.controller.message_send(request)
         flow_count += 1
         if flow_count % count_check == 0:
             obj.assertEqual(do_barrier(obj.controller, timeout=10), 0, "Barrier failed")
diff --git a/tests/detailed_contr_sw_messages.py b/tests/detailed_contr_sw_messages.py
index 25fc683..3ca0038 100644
--- a/tests/detailed_contr_sw_messages.py
+++ b/tests/detailed_contr_sw_messages.py
@@ -65,9 +65,7 @@
         act3 = action.action_output()
         act3.port = of_ports[1]
         msg3.actions.add(act3)
-        msg3.actions.add(1)
-        rv = self.controller.message_send(msg3)
-        self.assertTrue(rv != -1, "Error installing flow mod")
+        self.controller.message_send(msg3)
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
         # Verify Flow does not get inserted 
@@ -193,8 +191,7 @@
         
         request.actions.add(act)
         logging.info("Inserting flow")
-        rv = self.controller.message_send(request)
-        self.assertTrue(rv != -1, "Flow addition did not fail.")
+        self.controller.message_send(request)
 
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
@@ -241,8 +238,7 @@
         request.actions.add(act3)
 
         logging.info("Inserting flow")
-        rv = self.controller.message_send(request)
-        self.assertTrue(rv != -1, "Error installing flow mod")
+        self.controller.message_send(request)
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed") 
 
         #Verify the flow gets added i.e. active_count= 1
@@ -457,8 +453,7 @@
         act.port = of_ports[1]
         request.actions.add(act)
 
-        rv = self.controller.message_send(request)
-        self.assertTrue(rv != -1, "Flow addition failed.")
+        self.controller.message_send(request)
         
         # Delete the emergency flow
         
@@ -590,8 +585,7 @@
         msg7.buffer_id = 0xffffffff
         msg7.match = match
 
-        rv = self.controller.message_send(msg7)
-        self.assertTrue(rv != -1, "Error installing flow mod")
+        self.controller.message_send(msg7)
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
         # Verify flow will not get deleted, active_entries in table_stats_request = 1
@@ -607,8 +601,7 @@
         msg7.buffer_id = 0xffffffff
         msg7.match = match
 
-        rv = self.controller.message_send(msg7)
-        self.assertTrue(rv != -1, "Error installing flow mod")
+        self.controller.message_send(msg7)
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
         
         #Verify flow gets deleted.
@@ -783,8 +776,7 @@
         act3.port = of_ports[1]
         msg3.actions.add(act3)
 
-        rv = self.controller.message_send(msg3)
-        self.assertTrue(rv != -1, "Error installing flow mod")
+        self.controller.message_send(msg3)
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
         #Verify no flow removed message is generated
diff --git a/tests/flow_expire.py b/tests/flow_expire.py
index 93df5f8..705cab0 100644
--- a/tests/flow_expire.py
+++ b/tests/flow_expire.py
@@ -68,8 +68,7 @@
         request.actions.add(act)
         
         logging.info("Inserting flow")
-        rv = self.controller.message_send(request)
-        self.assertTrue(rv != -1, "Error installing flow mod")
+        self.controller.message_send(request)
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
         (response, pkt) = self.controller.poll(exp_msg=ofp.OFPT_FLOW_REMOVED,
diff --git a/tests/flow_query.py b/tests/flow_query.py
index 13c82c3..b205101 100644
--- a/tests/flow_query.py
+++ b/tests/flow_query.py
@@ -1330,8 +1330,7 @@
         request.match    = query_match
         request.table_id = 0xff
         request.out_port = ofp.OFPP_NONE;
-        if self.controller.message_send(request) == -1:
-            return False
+        self.controller.message_send(request)
         # <TBD>
         # Glue together successive reponse messages for stats reply.
         # Looking at the "more" flag and performing re-assembly
@@ -1367,7 +1366,8 @@
         logging.info("Sending flow_mod(add), xid=%d"
                         % (flow_mod_msg.header.xid)
                         )
-        return (self.controller.message_send(flow_mod_msg) != -1)
+        self.controller.message_send(flow_mod_msg)
+        return True
 
     def flow_mod(self, flow_cfg, strictf):
         flow_mod_msg = message.flow_mod()
@@ -1379,7 +1379,8 @@
         logging.info("Sending flow_mod(mod), xid=%d"
                         % (flow_mod_msg.header.xid)
                         )
-        return (self.controller.message_send(flow_mod_msg) != -1)
+        self.controller.message_send(flow_mod_msg)
+        return True
 
     def flow_del(self, flow_cfg, strictf):
         flow_mod_msg = message.flow_mod()
@@ -1393,7 +1394,8 @@
         logging.info("Sending flow_mod(del), xid=%d"
                         % (flow_mod_msg.header.xid)
                         )
-        return (self.controller.message_send(flow_mod_msg) != -1)
+        self.controller.message_send(flow_mod_msg)
+        return True
 
     def barrier(self):
         barrier = message.barrier_request()
diff --git a/tests/flow_stats.py b/tests/flow_stats.py
index da12071..e8322fd 100644
--- a/tests/flow_stats.py
+++ b/tests/flow_stats.py
@@ -148,8 +148,7 @@
        
         # send flow
         logging.info("Inserting flow")
-        rv = self.controller.message_send(flow_mod_msg)
-        self.assertTrue(rv != -1, "Error installing flow mod")
+        self.controller.message_send(flow_mod_msg)
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
         # no packets sent, so zero packet count
@@ -270,11 +269,9 @@
         flow_mod_msg2 = self.buildFlowModMsg(pkt2, ingress_port, egress_port2)
        
         logging.info("Inserting flow1")
-        rv = self.controller.message_send(flow_mod_msg1)
-        self.assertTrue(rv != -1, "Error installing flow mod")
+        self.controller.message_send(flow_mod_msg1)
         logging.info("Inserting flow2")
-        rv = self.controller.message_send(flow_mod_msg2)
-        self.assertTrue(rv != -1, "Error installing flow mod")
+        self.controller.message_send(flow_mod_msg2)
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
         num_pkt1s = random.randint(10,30)
@@ -384,11 +381,9 @@
         flow_mod_msg2 = self.buildFlowModMsg(pkt2, ingress_port, egress_port2)
        
         logging.info("Inserting flow1")
-        rv = self.controller.message_send(flow_mod_msg1)
-        self.assertTrue(rv != -1, "Error installing flow mod")
+        self.controller.message_send(flow_mod_msg1)
         logging.info("Inserting flow2")
-        rv = self.controller.message_send(flow_mod_msg2)
-        self.assertTrue(rv != -1, "Error installing flow mod")
+        self.controller.message_send(flow_mod_msg2)
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
         num_pkt1s = random.randint(10,30)
@@ -508,8 +503,7 @@
 
         # send flow
         logging.info("Inserting flow")
-        rv = self.controller.message_send(flow_mod_msg)
-        self.assertTrue(rv != -1, "Error installing flow mod")
+        self.controller.message_send(flow_mod_msg)
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
         # send packet N times
diff --git a/tests/load.py b/tests/load.py
index b35abc1..d3d3ca6 100644
--- a/tests/load.py
+++ b/tests/load.py
@@ -75,8 +75,7 @@
         act.port = ofp.OFPP_CONTROLLER
         request.actions.add(act)
 
-        rv = self.controller.message_send(request)
-        self.assertTrue(rv != -1, "Error installing flow mod")
+        self.controller.message_send(request)
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
         # Create packet out and send to port lb_port + 1
@@ -89,8 +88,7 @@
         logging.info("Sleeping before starting storm")
         time.sleep(1) # Root causing issue with fast disconnects
         logging.info("Sending packet out to %d" % (lb_port + 1))
-        rv = self.controller.message_send(msg)
-        self.assertTrue(rv == 0, "Error sending out message")
+        self.controller.message_send(msg)
 
         for idx in range(0, barrier_count):
             self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
@@ -186,8 +184,7 @@
                for count in range(100):
                    msg.xid = xid
                    xid += 1
-                   rv = self.controller.message_send(msg)
-                   self.assertTrue(rv == 0, "Error sending out message")
+                   self.controller.message_send(msg)
                    out_count += 1
 
                exp_pkt_arg = None
diff --git a/tests/message_types.py b/tests/message_types.py
index 2beaaab..0a72acd 100644
--- a/tests/message_types.py
+++ b/tests/message_types.py
@@ -38,8 +38,7 @@
         logging.info("Sending Hello...")
         request = message.hello()
         request.data = 'OpenFlow Will Rule The World'
-        rv=self.controller.message_send(request)
-        self.assertTrue(rv is not None,"Unable to send the message")
+        self.controller.message_send(request)
 
         #Verify Hello message in response 
         logging.info("Waiting for a Hello on the control plane with same xid,version--1.0.0 and data field empty")
@@ -64,8 +63,7 @@
         logging.info("Sending Echo With Data ...")
         request = message.echo_request()
         request.data = 'OpenFlow Will Rule The World'
-        rv=self.controller.message_send(request)
-        self.assertTrue(rv is not None,"Unable to send the message")
+        self.controller.message_send(request)
 
         #Verify Echo Reply is recieved 
         logging.info("Waiting for Echo Reply with data field copied from Echo Request")
@@ -100,8 +98,7 @@
         logging.info("Sending a Echo request with a version which is not supported by the switch")
         request=message.echo_request()
         request.header.version=0  
-        rv=self.controller.message_send(request)
-        self.assertTrue(rv is not None,"Unable to send the message")
+        self.controller.message_send(request)
 
         logging.info("Waiting for a OFPT_ERROR msg on the control plane...") 
         (response, pkt) = self.controller.poll(exp_msg=ofp.OFPT_ERROR,         
@@ -273,8 +270,7 @@
             req.flags = old_flags+1 
             new_flags = req.flags
 
-        rv=self.controller.message_send(req)
-        self.assertTrue(rv is not None,"Unable to send the message")
+        self.controller.message_send(req)
 
         #Send get_config_request -- verify change came into effect
         logging.info("Sending Get Config Request...")
@@ -310,8 +306,7 @@
         for bytes in miss_send_len :
             req = message.set_config()
             req.miss_send_len = bytes
-            rv=self.controller.message_send(req)
-            self.assertTrue(rv is not None,"Unable to send the message")
+            self.controller.message_send(req)
             sleep(1)
 
             # Send packet to trigger packet_in event
@@ -375,8 +370,7 @@
             request.actions.add(act)
             
             logging.info("Inserting flow....")
-            rv = self.controller.message_send(request)
-            self.assertTrue(rv != -1, "Error installing flow mod")
+            self.controller.message_send(request)
             self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
             
             #Send packet matching the flow
@@ -417,8 +411,7 @@
         logging.info("Sending  set_config_request to set miss_send_len... ")
         req = message.set_config()
         req.miss_send_len = 65535
-        rv=self.controller.message_send(req)
-        self.assertTrue(rv is not None,"Unable to send the message")
+        self.controller.message_send(req)
         sleep(1)
 
         # Send packet to trigger packet_in event
@@ -477,8 +470,7 @@
         request.actions.add(act)
 
         logging.info("Inserting flow....")
-        rv = self.controller.message_send(request)
-        self.assertTrue(rv != -1, "Error installing flow mod")
+        self.controller.message_send(request)
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
             
         #Send packet matching the flow
diff --git a/tests/openflow_protocol_messages.py b/tests/openflow_protocol_messages.py
index 2d57978..037209d 100644
--- a/tests/openflow_protocol_messages.py
+++ b/tests/openflow_protocol_messages.py
@@ -43,8 +43,7 @@
         logging.info("Expecting Features_Reply")
 
         request = message.features_request()
-        rv = self.controller.message_send(request)
-        self.assertTrue(rv != -1, "Not able to send features request.")
+        self.controller.message_send(request)
         
         (response, pkt) = self.controller.poll(exp_msg=ofp.OFPT_FEATURES_REPLY,
                                                timeout=2)
@@ -73,8 +72,7 @@
         logging.info("Expecting OFPT_GET_CONFIG_REPLY ")
 
         request = message.get_config_request()
-        rv = self.controller.message_send(request)
-        self.assertTrue(rv != -1, " Not able to send get_config request.")
+        self.controller.message_send(request)
         
         (response, pkt) = self.controller.poll(exp_msg=ofp.OFPT_GET_CONFIG_REPLY,
                                                timeout=2)
@@ -235,8 +233,7 @@
                 msg.actions.add(act)
 
                 logging.info("PacketOut to: " + str(dp_port))
-                rv = self.controller.message_send(msg)
-                self.assertTrue(rv == 0, "Error sending out message")
+                self.controller.message_send(msg)
 
                 exp_pkt_arg = None
                 exp_port = None
diff --git a/tests/pktact.py b/tests/pktact.py
index 5a1bedf..4a9f7cc 100644
--- a/tests/pktact.py
+++ b/tests/pktact.py
@@ -125,8 +125,7 @@
             request.actions.add(act)
 
             logging.info("Inserting flow")
-            rv = self.controller.message_send(request)
-            self.assertTrue(rv != -1, "Error installing flow mod")
+            self.controller.message_send(request)
             self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
             logging.info("Sending packet to dp port " + 
@@ -191,8 +190,7 @@
         request.actions.add(act)
 
         logging.info("Inserting flow")
-        rv = self.controller.message_send(request)
-        self.assertTrue(rv != -1, "Error installing flow mod")
+        self.controller.message_send(request)
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
         logging.info("Sending packet to dp port " +
@@ -280,8 +278,7 @@
                 request.actions.add(act)
 
                 logging.info("Inserting flow")
-                rv = self.controller.message_send(request)
-                self.assertTrue(rv != -1, "Error installing flow mod")
+                self.controller.message_send(request)
                 self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
                 # Get current stats for selected egress queue
@@ -411,8 +408,7 @@
                 request.actions.add(act)
 
                 logging.info("Inserting flow")
-                rv = self.controller.message_send(request)
-                self.assertTrue(rv != -1, "Error installing flow mod")
+                self.controller.message_send(request)
                 self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
                 # Get current stats for selected egress queue
@@ -533,8 +529,7 @@
             # logging.info(request.show())
 
             logging.info("Inserting flow")
-            rv = self.controller.message_send(request)
-            self.assertTrue(rv != -1, "Error installing flow mod")
+            self.controller.message_send(request)
             self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
             logging.info("Sending packet to dp port " + 
@@ -589,8 +584,7 @@
             logging.debug(request.show())
 
             logging.info("Inserting flow")
-            rv = self.controller.message_send(request)
-            self.assertTrue(rv != -1, "Error installing flow mod")
+            self.controller.message_send(request)
             self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
             logging.info("Sending packet to dp port " + str(ingress_port))
@@ -643,8 +637,7 @@
             # logging.info(request.show())
 
             logging.info("Inserting flow")
-            rv = self.controller.message_send(request)
-            self.assertTrue(rv != -1, "Error installing flow mod")
+            self.controller.message_send(request)
             self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
             logging.info("Sending packet to dp port " + str(ingress_port))
@@ -688,8 +681,7 @@
             logging.info(request.show())
 
             logging.info("Inserting flow")
-            rv = self.controller.message_send(request)
-            self.assertTrue(rv != -1, "Error installing flow mod")
+            self.controller.message_send(request)
             self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
             logging.info("Sending packet to dp port " + str(ingress_port))
@@ -738,8 +730,7 @@
             logging.info(request.show())
 
             logging.info("Inserting flow")
-            rv = self.controller.message_send(request)
-            self.assertTrue(rv != -1, "Error installing flow mod")
+            self.controller.message_send(request)
             self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
             logging.info("Sending packet to dp port " + str(ingress_port))
@@ -783,8 +774,7 @@
             logging.info(request.show())
 
             logging.info("Inserting flow")
-            rv = self.controller.message_send(request)
-            self.assertTrue(rv != -1, "Error installing flow mod")
+            self.controller.message_send(request)
             self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
             logging.info("Sending packet to dp port " + str(ingress_port))
@@ -833,8 +823,7 @@
             logging.info(request.show())
 
             logging.info("Inserting flow")
-            rv = self.controller.message_send(request)
-            self.assertTrue(rv != -1, "Error installing flow mod")
+            self.controller.message_send(request)
             self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
             logging.info("Sending packet to dp port " + str(ingress_port))
@@ -892,8 +881,7 @@
             logging.info(request.show())
 
             logging.info("Inserting flow")
-            rv = self.controller.message_send(request)
-            self.assertTrue(rv != -1, "Error installing flow mod")
+            self.controller.message_send(request)
             self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
             logging.info("Sending packet to dp port " + str(ingress_port))
@@ -1802,8 +1790,7 @@
 
         # Install the first set of flows
         for f_idx in range(flow_count):
-            rv = self.controller.message_send(flows[0][f_idx])
-            self.assertTrue(rv != -1, "Error installing flow %d" % f_idx)
+            self.controller.message_send(flows[0][f_idx])
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
     
         logging.info("Installed %d flows" % flow_count)
@@ -1822,10 +1809,8 @@
             for toggle in range(2):
                 t_idx = 1 - toggle
                 for f_idx in range(flow_count):
-                    rv = self.controller.message_send(flows[t_idx][f_idx])
+                    self.controller.message_send(flows[t_idx][f_idx])
                     updates += 1
-                    self.assertTrue(rv != -1, "Error modifying flow %d" % 
-                                    f_idx)
                 self.assertEqual(do_barrier(self.controller), 0,
                                  "Barrier failed")
 
@@ -2104,8 +2089,7 @@
             request.actions.add(act)
 
         logging.info("Inserting flow")
-        rv = self.controller.message_send(request)
-        self.assertTrue(rv != -1, "Error installing flow mod")
+        self.controller.message_send(request)
 
         # This flow speeds up negative tests
         logging.info("Inserting catch-all flow")
@@ -2115,8 +2099,7 @@
         act = action.action_output()
         act.port = ofp.OFPP_IN_PORT
         request2.actions.add(act)
-        rv = self.controller.message_send(request2)
-        self.assertTrue(rv != -1, "Error installing flow mod")
+        self.controller.message_send(request2)
 
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
diff --git a/tests/port_stats.py b/tests/port_stats.py
index eb7e612..bacf1d8 100644
--- a/tests/port_stats.py
+++ b/tests/port_stats.py
@@ -176,8 +176,7 @@
        
         # send flow
         logging.info("Inserting flow")
-        rv = self.controller.message_send(flow_mod_msg)
-        self.assertTrue(rv != -1, "Error installing flow mod")
+        self.controller.message_send(flow_mod_msg)
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
         # get initial port stats count
@@ -247,11 +246,9 @@
         flow_mod_msg2 = self.buildFlowModMsg(pkt2, ingress_port, egress_port2)
        
         logging.info("Inserting flow1")
-        rv = self.controller.message_send(flow_mod_msg1)
-        self.assertTrue(rv != -1, "Error installing flow mod")
+        self.controller.message_send(flow_mod_msg1)
         logging.info("Inserting flow2")
-        rv = self.controller.message_send(flow_mod_msg2)
-        self.assertTrue(rv != -1, "Error installing flow mod")
+        self.controller.message_send(flow_mod_msg2)
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
         # get initial port stats count
@@ -325,11 +322,9 @@
         flow_mod_msg2 = self.buildFlowModMsg(pkt2, port0, port2)
        
         logging.info("Inserting flow1")
-        rv = self.controller.message_send(flow_mod_msg1)
-        self.assertTrue(rv != -1, "Error installing flow mod")
+        self.controller.message_send(flow_mod_msg1)
         logging.info("Inserting flow2")
-        rv = self.controller.message_send(flow_mod_msg2)
-        self.assertTrue(rv != -1, "Error installing flow mod")
+        self.controller.message_send(flow_mod_msg2)
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
         num_pkt1s = random.randint(5,10)
