[rhmessaging-commits] rhmessaging commits: r2848 - mgmt/trunk/wooly/python/wooly.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Wed Nov 19 17:21:34 EST 2008
Author: eallen
Date: 2008-11-19 17:21:34 -0500 (Wed, 19 Nov 2008)
New Revision: 2848
Modified:
mgmt/trunk/wooly/python/wooly/tables.py
Log:
Separated sql_values and find_values for finding an item in an SQLTable
Modified: mgmt/trunk/wooly/python/wooly/tables.py
===================================================================
--- mgmt/trunk/wooly/python/wooly/tables.py 2008-11-19 22:20:36 UTC (rev 2847)
+++ mgmt/trunk/wooly/python/wooly/tables.py 2008-11-19 22:21:34 UTC (rev 2848)
@@ -283,13 +283,19 @@
cursor = conn.cursor()
select = self.render_find_sql(session, *args)
where = self.render_sql_where(session, *args)
+ sql_values = self.get_sql_values(session, *args)
+
find_where = self.render_find_sql_where(session, *args)
find_values = self.get_find_sql_values(session, *args)
sql = " and ".join(["%s %s" % (select, where), find_where])
+ if sql_values:
+ for sql_val in sql_values:
+ find_values[sql_val] = sql_values[sql_val]
+
try:
cursor.execute(sql, find_values)
return self.cursor_to_rows(cursor)
- except:
+ except Exception, e:
pass
def cursor_to_rows(self, cursor):
More information about the rhmessaging-commits
mailing list