Author: justi9
Date: 2008-03-06 13:25:07 -0500 (Thu, 06 Mar 2008)
New Revision: 1764
Modified:
mgmt/mint/python/mint/__init__.py
Log:
Add a method to navigate to the default vhost, if present
Modified: mgmt/mint/python/mint/__init__.py
===================================================================
--- mgmt/mint/python/mint/__init__.py 2008-03-06 16:26:43 UTC (rev 1763)
+++ mgmt/mint/python/mint/__init__.py 2008-03-06 18:25:07 UTC (rev 1764)
@@ -48,6 +48,13 @@
print "Connection failed: " + str(conn.exception)
print_exc()
+ def getDefaultVhost(self):
+ if self.broker:
+ try:
+ return Vhost.selectBy(broker=self.broker, name="/")[0]
+ except IndexError:
+ pass
+
class BrokerGroup(SQLObject):
class sqlmeta:
lazyUpdate = True
Show replies by date