2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/d1f9d077c228/ Changeset: d1f9d077c228 Branch: next-stable User: jjohnson Date: 2014-12-12 19:16:28+00:00 Summary: Use a SELECT statement to reliably retrieve table column names. Affected #: 1 file diff -r d8b93cd3b491946703f52f74bf231c2aee339373 -r d1f9d077c2288b25a35ae97e306cdf2924548d62 lib/galaxy/datatypes/binary.py --- a/lib/galaxy/datatypes/binary.py +++ b/lib/galaxy/datatypes/binary.py @@ -571,10 +571,19 @@ rslt = c.execute(tables_query).fetchall() for table,sql in rslt: tables.append(table) - columns[table] = re.sub('^.*\((.*)\)$','\\1',sql).split(',') + try: + col_query = 'SELECT * FROM %s LIMIT 0' % table + cur = conn.cursor().execute(col_query) + cols = [col[0] for col in cur.description] + columns[table] = cols + except Exception, exc: + log.warn( '%s, set_meta Exception: %s', self, exc ) for table in tables: - row_query = "SELECT count(*) FROM %s" % table - rowcounts[table] = c.execute(row_query).fetchone()[0] + try: + row_query = "SELECT count(*) FROM %s" % table + rowcounts[table] = c.execute(row_query).fetchone()[0] + except Exception, exc: + log.warn( '%s, set_meta Exception: %s', self, exc ) dataset.metadata.tables = tables dataset.metadata.table_columns = columns dataset.metadata.table_row_count = rowcounts https://bitbucket.org/galaxy/galaxy-central/commits/bd380f15c1b3/ Changeset: bd380f15c1b3 User: dannon Date: 2014-12-16 07:42:21+00:00 Summary: Merge. Affected #: 0 files Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.