Author: justi9
Date: 2010-09-20 12:56:26 -0400 (Mon, 20 Sep 2010)
New Revision: 4310
Modified:
mgmt/newdata/cumin/python/cumin/messaging/binding.py
Log:
Can't use try/except/finally on older pythons
Modified: mgmt/newdata/cumin/python/cumin/messaging/binding.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/messaging/binding.py 2010-09-20 15:29:09 UTC (rev
4309)
+++ mgmt/newdata/cumin/python/cumin/messaging/binding.py 2010-09-20 16:56:26 UTC (rev
4310)
@@ -28,14 +28,15 @@
queue = None
exchange = None
try:
- cls = self.app.model.org_apache_qpid_broker.Queue
- queue = cls.get_object_by_id(cursor, binding._queueRef_id)
- cls = self.app.model.org_apache_qpid_broker.Exchange
- exchange = cls.get_object_by_id(cursor, binding._exchangeRef_id)
- except Exception, e:
- invoc.status = "failed"
- invoc.exception = e
- log.exception(e)
+ try:
+ cls = self.app.model.org_apache_qpid_broker.Queue
+ queue = cls.get_object_by_id(cursor, binding._queueRef_id)
+ cls = self.app.model.org_apache_qpid_broker.Exchange
+ exchange = cls.get_object_by_id(cursor, binding._exchangeRef_id)
+ except Exception, e:
+ invoc.status = "failed"
+ invoc.exception = e
+ log.exception(e)
finally:
conn.close()
Show replies by date