Mercurial > p > roundup > code
comparison roundup/admin.py @ 1751:ab7760caf6ff
Importing wasn't setting None values explicitly when it should have been
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 26 Aug 2003 00:06:56 +0000 |
| parents | 4856faf558a2 |
| children | fdaa0b751355 |
comparison
equal
deleted
inserted
replaced
| 1748:0f2678eeeac6 | 1751:ab7760caf6ff |
|---|---|
| 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.55 2003-06-23 08:05:30 neaj Exp $ | 19 # $Id: admin.py,v 1.56 2003-08-26 00:06:55 richard Exp $ |
| 20 | 20 |
| 21 '''Administration commands for maintaining Roundup trackers. | 21 '''Administration commands for maintaining Roundup trackers. |
| 22 ''' | 22 ''' |
| 23 | 23 |
| 24 import sys, os, getpass, getopt, re, UserDict, shutil, rfc822 | 24 import sys, os, getpass, getopt, re, UserDict, shutil, rfc822 |
| 1142 # ensure that the properties and the CSV file headings match | 1142 # ensure that the properties and the CSV file headings match |
| 1143 cl = self.get_class(classname) | 1143 cl = self.get_class(classname) |
| 1144 p = csv.parser(field_sep=':') | 1144 p = csv.parser(field_sep=':') |
| 1145 file_props = p.parse(f.readline()) | 1145 file_props = p.parse(f.readline()) |
| 1146 | 1146 |
| 1147 # XXX we don't _really_ need to do this... | |
| 1148 # properties = cl.getprops() | |
| 1149 # propnames = properties.keys() | |
| 1150 # propnames.sort() | |
| 1151 # m = file_props[:] | |
| 1152 # m.sort() | |
| 1153 # if m != propnames: | |
| 1154 # raise UsageError, _('Import file doesn\'t define the same ' | |
| 1155 # 'properties as "%(arg0)s".')%{'arg0': args[0]} | |
| 1156 | |
| 1157 # loop through the file and create a node for each entry | 1147 # loop through the file and create a node for each entry |
| 1158 maxid = 1 | 1148 maxid = 1 |
| 1159 while 1: | 1149 while 1: |
| 1160 line = f.readline() | 1150 line = f.readline() |
| 1161 if not line: break | 1151 if not line: break |
