Author: nunofsantos
Date: 2008-06-02 18:41:32 -0400 (Mon, 02 Jun 2008)
New Revision: 2110
Modified:
mgmt/mint/python/mint/__init__.py
Log:
use capitalize()
Modified: mgmt/mint/python/mint/__init__.py
===================================================================
--- mgmt/mint/python/mint/__init__.py 2008-06-02 22:09:34 UTC (rev 2109)
+++ mgmt/mint/python/mint/__init__.py 2008-06-02 22:41:32 UTC (rev 2110)
@@ -371,7 +371,7 @@
def schemaCallback(self, brokerId, classInfo, configs, metric, methods, events):
self.log("\nSCHEMA---------------------------------------------------")
self.log("BrokerId=%s , ClassInfo[1]=%s" % (brokerId, classInfo[1]))
- cls = schema.schemaNameToClassMap.get(classInfo[1][0].upper() + classInfo[1][1:])
+ cls = schema.schemaNameToClassMap.get(classInfo[1].capitalize())
if cls:
cls.classInfos[brokerId] = classInfo
self.log("\nEND
SCHEMA---------------------------------------------------")
@@ -379,7 +379,7 @@
def configCallback(self, brokerId, classInfo, list, timestamps):
self.log("\nCONFIG---------------------------------------------------")
- objectName = classInfo[1][0].upper() + classInfo[1][1:]
+ objectName = classInfo[1].capitalize()
brokerUUID = classInfo[2]
self.log(objectName)
d = self.sanitizeDict(dict(list))
@@ -397,7 +397,7 @@
try:
for parentKey in self.findParentKeys(d):
convertedKey = self.convertRefKey(parentKey)
- cls = schema.schemaNameToClassMap.get(convertedKey[0].upper() +
convertedKey[1:])
+ cls = schema.schemaNameToClassMap.get(convertedKey.capitalize())
if (convertedKey == "connection"):
convertedKey = "clientConnection"
if cls:
@@ -422,7 +422,7 @@
def instCallback(self, brokerId, classInfo, list, timestamps):
self.log("\nINST---------------------------------------------------")
- objectName = classInfo[1][0].upper() + classInfo[1][1:]
+ objectName = classInfo[1].capitalize()
brokerUUID = classInfo[2]
self.log(objectName)
d = self.sanitizeDict(dict(list))
Show replies by date