[rhmessaging-commits] rhmessaging commits: r2451 - mgmt/trunk/mint/python/mint.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Thu Sep 11 16:11:26 EDT 2008


Author: justi9
Date: 2008-09-11 16:11:25 -0400 (Thu, 11 Sep 2008)
New Revision: 2451

Modified:
   mgmt/trunk/mint/python/mint/update.py
Log:
Use the reserved word maps to translate attributes on input

Modified: mgmt/trunk/mint/python/mint/update.py
===================================================================
--- mgmt/trunk/mint/python/mint/update.py	2008-09-11 19:57:54 UTC (rev 2450)
+++ mgmt/trunk/mint/python/mint/update.py	2008-09-11 20:11:25 UTC (rev 2451)
@@ -5,6 +5,7 @@
 from datetime import datetime
 from qpid.management import managementClient
 from struct import unpack
+from schema import schemaReservedWordsMap
 
 import mint
 
@@ -81,6 +82,12 @@
     del attrs["arguments"]
 
   for name in attrs.keys():
+    rename = schemaReservedWordsMap.get(name)
+
+    if rename:
+      attrs[rename] = attrs.pop(name)
+      name = rename
+
     if len(name) > 3 and name.endswith("Ref"):
       # Navigate to referenced objects
 




More information about the rhmessaging-commits mailing list