comparison roundup/admin.py @ 3214:29bde1f0d364

merge from maint-0-8
author Richard Jones <richard@users.sourceforge.net>
date Mon, 28 Feb 2005 03:14:49 +0000
parents 6d0b5937ee0d
children 9ddf9cd8baf5
comparison
equal deleted inserted replaced
3212:bf456e1cfd46 3214:29bde1f0d364
14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
18 # 18 #
19 # $Id: admin.py,v 1.88 2005-02-16 14:22:16 a1s Exp $ 19 # $Id: admin.py,v 1.89 2005-02-28 03:14:49 richard Exp $
20 20
21 '''Administration commands for maintaining Roundup trackers. 21 '''Administration commands for maintaining Roundup trackers.
22 ''' 22 '''
23 __docformat__ = 'restructuredtext' 23 __docformat__ = 'restructuredtext'
24 24
1121 1121
1122 cl = self.get_class(classname) 1122 cl = self.get_class(classname)
1123 1123
1124 # ensure that the properties and the CSV file headings match 1124 # ensure that the properties and the CSV file headings match
1125 f = open(os.path.join(dir, file), 'rU') 1125 f = open(os.path.join(dir, file), 'rU')
1126 reader = csv.reader(f, csv.colon_separated) 1126 reader = csv.reader(f, colon_separated)
1127 file_props = None 1127 file_props = None
1128 maxid = 1 1128 maxid = 1
1129 # loop through the file and create a node for each entry 1129 # loop through the file and create a node for each entry
1130 for r in reader: 1130 for r in reader:
1131 if file_props is None: 1131 if file_props is None:
1139 1139
1140 f.close() 1140 f.close()
1141 1141
1142 # import the journals 1142 # import the journals
1143 f = open(os.path.join(args[0], classname + '-journals.csv'), 'rU') 1143 f = open(os.path.join(args[0], classname + '-journals.csv'), 'rU')
1144 reader = csv.reader(f, csv.colon_separated) 1144 reader = csv.reader(f, colon_separated)
1145 cl.import_journals(reader) 1145 cl.import_journals(reader)
1146 f.close() 1146 f.close()
1147 1147
1148 # set the id counter 1148 # set the id counter
1149 print 'setting', classname, maxid+1 1149 print 'setting', classname, maxid+1

Roundup Issue Tracker: http://roundup-tracker.org/