summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a7fc8f6)
raw | patch | inline | side by side (parent: a7fc8f6)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Fri, 21 Mar 2003 04:02:13 +0000 (04:02 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Fri, 21 Mar 2003 04:02:13 +0000 (04:02 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1611 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/admin.py | patch | blob | history | |
roundup/backends/rdbms_common.py | patch | blob | history |
diff --git a/roundup/admin.py b/roundup/admin.py
index 2f425c5621e0cb9a598c3347ddcc22f4b3d43736..4521c812578f6c69cc7538f0a4f65ed0f5227578 100644 (file)
--- a/roundup/admin.py
+++ b/roundup/admin.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: admin.py,v 1.44 2003-03-18 23:15:29 richard Exp $
+# $Id: admin.py,v 1.45 2003-03-21 04:02:12 richard Exp $
'''Administration commands for maintaining Roundup trackers.
'''
for nodeid in self.db.getclass(classname).getnodeids():
# get the regular props
print >>f, p.join(cl.export_list(propnames, nodeid))
+
+ # close this file
+ f.close()
return 0
def do_import(self, args):
index 8670cf3b50fba1f4f46d7ff10499bd9eae10808d..e560629123836efa97b50c28f59a1285c9cc3236 100644 (file)
-# $Id: rdbms_common.py,v 1.46 2003-03-18 00:50:24 richard Exp $
+# $Id: rdbms_common.py,v 1.47 2003-03-21 04:02:13 richard Exp $
''' Relational database (SQL) backend common code.
Basics:
# flip the sense of the flag if we don't want all of them
if retired is not None:
retired = not retired
- sql = 'select id from _%s where __retired__ <> %s'%(self.classname,
- self.db.arg)
+ args = (retired, )
+ sql = 'select id from _%s where __retired__ <> %s'%(self.classname,
+ self.db.arg)
+ else:
+ args = ()
+ sql = 'select id from _%s'%self.classname
if __debug__:
print >>hyperdb.DEBUG, 'getnodeids', (self, sql, retired)
- self.db.cursor.execute(sql, (retired,))
- return [x[0] for x in self.db.cursor.fetchall()]
+ self.db.cursor.execute(sql, args)
+ ids = [x[0] for x in self.db.cursor.fetchall()]
+ return ids
def filter(self, search_matches, filterspec, sort=(None,None),
group=(None,None)):