You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rh...@apache.org on 2009/09/17 16:47:39 UTC

svn commit: r816222 - /qpid/trunk/qpid/python/qpid/ops.py

Author: rhs
Date: Thu Sep 17 14:47:39 2009
New Revision: 816222

URL: http://svn.apache.org/viewvc?rev=816222&view=rev
Log:
changed dispatch to throw an attribute error if there is no handler

Modified:
    qpid/trunk/qpid/python/qpid/ops.py

Modified: qpid/trunk/qpid/python/qpid/ops.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/ops.py?rev=816222&r1=816221&r2=816222&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/ops.py (original)
+++ qpid/trunk/qpid/python/qpid/ops.py Thu Sep 17 14:47:39 2009
@@ -74,10 +74,7 @@
 
   def dispatch(self, target, *args):
     handler = "do_%s" % self.NAME
-    if hasattr(target, handler):
-      getattr(target, handler)(self, *args)
-    else:
-      print "UNHANDLED:", target, args
+    getattr(target, handler)(self, *args)
 
   def __repr__(self, extras=()):
     return "%s(%s)" % (self.__class__.__name__,



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org