From 25ce92969ac9e9c7f02f42470c2d019b630b958a Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 10 Feb 2010 21:30:11 -0600 Subject: reporead: remove unused functions Signed-off-by: Dan McGee --- scripts/reporead.py | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/scripts/reporead.py b/scripts/reporead.py index 2d1460ca..0806eb4e 100755 --- a/scripts/reporead.py +++ b/scripts/reporead.py @@ -128,37 +128,6 @@ def usage(): print __doc__.strip() -def fetchiter_dict(cursor): - """ - Given a DB API 2.0 cursor object that has been executed, returns a - dictionary that maps each field to a column index - """ - rows = cursor.fetchmany(size=30) - while rows: - for row in rows: - #pp(rows) - #for row in rows: - yield dictize(cursor,row) - rows = cursor.fetchmany(size=30) - - -def fetchone_dict(cursor): - """ - Given a DB API 2.0 cursor object that has been executed, returns a - dictionary that maps each field to a column index - """ - results = {} - row = cursor.fetchone() - return dictize(cursor,row) - - -def dictize(cursor,row): - result = {} - for column,desc in enumerate(cursor.description): - result[desc[0]] = row[column] - return result - - def populate_pkg(dbpkg, repopkg, timestamp=None): if not timestamp: timestamp = datetime.now() dbpkg.pkgbase = repopkg.base -- cgit v1.2.3-55-g3dc8