[rhmessaging-commits] rhmessaging commits: r2845 - mgmt/trunk/mint/python/mint.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Wed Nov 19 16:03:27 EST 2008
Author: nunofsantos
Date: 2008-11-19 16:03:27 -0500 (Wed, 19 Nov 2008)
New Revision: 2845
Modified:
mgmt/trunk/mint/python/mint/update.py
Log:
do check for hasattr as last case
Modified: mgmt/trunk/mint/python/mint/update.py
===================================================================
--- mgmt/trunk/mint/python/mint/update.py 2008-11-19 17:21:39 UTC (rev 2844)
+++ mgmt/trunk/mint/python/mint/update.py 2008-11-19 21:03:27 UTC (rev 2845)
@@ -85,10 +85,7 @@
if name in mint.schema.schemaReservedWordsMap:
name = mint.schema.schemaReservedWordsMap.get(name)
- if not hasattr(getattr(mint, cls), name):
- # Discard attrs that we don't have in our schema
- log.debug("Class '%s' has no field '%s'" % ("mint.schema." + cls, name))
- elif key.type == 10:
+ if key.type == 10:
# Navigate to referenced objects
if name.endswith("Ref"):
name = name[:-3]
@@ -116,6 +113,9 @@
elif key.type == 14:
# convert UUIDs into their string representation, to be handled by sqlobject
results[name] = str(value)
+ elif not hasattr(getattr(mint, cls), name):
+ # Discard attrs that we don't have in our schema
+ log.debug("Class '%s' has no field '%s'" % (cls, name))
else:
results[name] = value
if orphan:
More information about the rhmessaging-commits
mailing list