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
