[rhmessaging-commits] rhmessaging commits: r1427 - mgmt/mint/python/mint.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Tue Dec 4 15:58:15 EST 2007
Author: justi9
Date: 2007-12-04 15:58:15 -0500 (Tue, 04 Dec 2007)
New Revision: 1427
Modified:
mgmt/mint/python/mint/__init__.py
Log:
Only attempt to attach brokers to registrations if we have the
necessary data.
Modified: mgmt/mint/python/mint/__init__.py
===================================================================
--- mgmt/mint/python/mint/__init__.py 2007-12-04 20:57:47 UTC (rev 1426)
+++ mgmt/mint/python/mint/__init__.py 2007-12-04 20:58:15 UTC (rev 1427)
@@ -75,22 +75,23 @@
pass
if obj and obj.__class__ is Broker and obj.registration is None:
- host, port = obj.managedBroker.split(":")
+ if obj.managedBroker:
+ host, port = obj.managedBroker.split(":")
- port = int(port)
+ port = int(port)
- if port == 5672:
- port = None
+ if port == 5672:
+ port = None
- regs = BrokerRegistration.selectBy(host=host, port=port)
+ regs = BrokerRegistration.selectBy(host=host, port=port)
- print "regs", regs
+ print "regs", regs
- for reg in regs:
- print "Attaching broker to reg", reg
-
- reg.broker = obj
- obj.registration = reg
+ for reg in regs:
+ print "Attaching broker to reg", reg
+
+ reg.broker = obj
+ obj.registration = reg
return obj
More information about the rhmessaging-commits
mailing list