[rhmessaging-commits] rhmessaging commits: r1605 - mgmt/mint/python/mint.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Thu Jan 24 15:20:42 EST 2008


Author: justi9
Date: 2008-01-24 15:20:42 -0500 (Thu, 24 Jan 2008)
New Revision: 1605

Modified:
   mgmt/mint/python/mint/__init__.py
Log:
>From nuno: mask off the original id value from the broker so that it
will fit in the db column.



Modified: mgmt/mint/python/mint/__init__.py
===================================================================
--- mgmt/mint/python/mint/__init__.py	2008-01-24 20:18:48 UTC (rev 1604)
+++ mgmt/mint/python/mint/__init__.py	2008-01-24 20:20:42 UTC (rev 1605)
@@ -1,4 +1,5 @@
 import socket
+import types
 from qpid.management import ManagedBroker
 from datetime import *
 from sqlobject import *
@@ -136,6 +137,9 @@
   def sanitizeDict(self, d):
     if ("id" in d):
       d[self.convertIdKey("id")] = d.pop("id")
+    for (key,val) in d.iteritems():
+      if (type(val) is types.LongType and (val & pow(2,63) > 0)):
+        d[key] = val & (~ pow(2,63))
     return d
 
   def convertIdKey(self, k):




More information about the rhmessaging-commits mailing list