extras-buildsys/server UserInterface.py,1.58.2.2.4.3,1.58.2.2.4.4
Michael Schwendt
mschwendt at fedoraproject.org
Thu Sep 4 21:02:29 UTC 2008
Author: mschwendt
Update of /cvs/fedora/extras-buildsys/server
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1635
Modified Files:
Tag: Plague-0_4_5
UserInterface.py
Log Message:
EL5 python-sqlite: PASS - now retry F8 python-sqlite2
Index: UserInterface.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/server/UserInterface.py,v
retrieving revision 1.58.2.2.4.3
retrieving revision 1.58.2.2.4.4
diff -u -r1.58.2.2.4.3 -r1.58.2.2.4.4
--- UserInterface.py 4 Sep 2008 20:45:23 -0000 1.58.2.2.4.3
+++ UserInterface.py 4 Sep 2008 21:02:28 -0000 1.58.2.2.4.4
@@ -84,12 +84,6 @@
return target_cfg
-def _fetchone(cursor,row): # sqlite3 helper
- if not row:
- return None
- return DBManager.ResultSet(row, cursor.description)
-
-
class UserInterface:
"""
Base UserInterface class. NO AUTHENTICATION. Subclass this to provide some.
@@ -190,7 +184,7 @@
del curs, dbcx
return (-1, "Unable to access job database: '%s'" % e)
curs.execute(sql)
- job = _fetchone(curs,dbcx.fetchone(curs))
+ job = dbcx.fetchone(curs)
result = None
if not job:
result = (-1, "Error: Invalid job UID.")
@@ -324,7 +318,7 @@
del curs, dbcx
return (-1, "Unable to access job database: '%s'" % e, [])
curs.execute(sql)
- data = [DBManager.ResultSet(row,curs.description) for row in curs.fetchall()]
+ data = dbcx.fetchall(curs)
jobs = []
for row in data:
jobrec = {}
@@ -355,7 +349,7 @@
sql = "SELECT jobid, parent_uid, starttime, endtime, arch, builder_addr, " \
"status, builder_status FROM archjobs WHERE " + uids
curs.execute(sql)
- data = [DBManager.ResultSet(row,curs.description) for row in curs.fetchall()]
+ data = dbcx.fetchall(curs)
for row in data:
ajrec = {}
ajrec['jobid'] = row['jobid']
@@ -392,7 +386,7 @@
except StandardError, e:
return (-1, "Unable to access job database: '%s'" % e, {})
curs.execute(sql)
- job = _fetchone(curs,dbcx.fetchone(curs))
+ job = dbcx.fetchone(curs)
if not job:
del curs, dbcx
return (-1, "Error: Invalid job UID.", {})
@@ -426,7 +420,7 @@
sql = "SELECT jobid, parent_uid, starttime, endtime, arch, builder_addr, " \
"status, builder_status FROM archjobs WHERE parent_uid=%d " % uid
curs.execute(sql)
- data = [DBManager.ResultSet(row,curs.description) for row in curs.fetchall()]
+ data = dbcx.fetchall(curs)
for row in data:
ajrec = {}
ajrec['jobid'] = row['jobid']
@@ -547,7 +541,7 @@
return (-1, "Unable to access job database: '%s'" % e)
curs.execute(sql)
- job = _fetchone(curs,dbcx.fetchone(curs))
+ job = dbcx.fetchone(curs)
result = None
if not job:
@@ -636,7 +630,7 @@
return (-1, "Unable to access job database: '%s'" % e)
curs.execute(sql)
- data = [DBManager.ResultSet(row,curs.description) for row in curs.fetchall()]
+ data = dbcx.fetchall(curs)
# Ensure that the user can actually finish the jobs they requested
final_uid_list = []
More information about the fedora-extras-commits
mailing list