comparison roundup/admin.py @ 626:300e17e7045c

Wasn't handling the cvs parser feeding properly.
author Richard Jones <richard@users.sourceforge.net>
date Wed, 20 Feb 2002 05:04:32 +0000
parents 2fc4f8942a59
children 29f7e41ee437
comparison
equal deleted inserted replaced
625:88acf6fe20a8 626:300e17e7045c
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.6 2002-01-23 07:27:19 grubert Exp $ 19 # $Id: admin.py,v 1.7 2002-02-20 05:04:32 richard Exp $
20 20
21 import sys, os, getpass, getopt, re, UserDict, shlex 21 import sys, os, getpass, getopt, re, UserDict, shlex
22 try: 22 try:
23 import csv 23 import csv
24 except ImportError: 24 except ImportError:
834 834
835 # parse lines until we get a complete entry 835 # parse lines until we get a complete entry
836 while 1: 836 while 1:
837 l = p.parse(line) 837 l = p.parse(line)
838 if l: break 838 if l: break
839 line = f.readline()
840 if not line:
841 raise ValueError, "Unexpected EOF during CSV parse"
839 842
840 # make the new node's property map 843 # make the new node's property map
841 d = {} 844 d = {}
842 for i in n: 845 for i in n:
843 # Use eval to reverse the repr() used to output the CSV 846 # Use eval to reverse the repr() used to output the CSV
1037 tool = AdminTool() 1040 tool = AdminTool()
1038 sys.exit(tool.main()) 1041 sys.exit(tool.main())
1039 1042
1040 # 1043 #
1041 # $Log: not supported by cvs2svn $ 1044 # $Log: not supported by cvs2svn $
1045 # Revision 1.6 2002/01/23 07:27:19 grubert
1046 # . allow abbreviation of "help" in admin tool too.
1047 #
1042 # Revision 1.5 2002/01/21 16:33:19 rochecompaan 1048 # Revision 1.5 2002/01/21 16:33:19 rochecompaan
1043 # You can now use the roundup-admin tool to pack the database 1049 # You can now use the roundup-admin tool to pack the database
1044 # 1050 #
1045 # Revision 1.4 2002/01/14 06:51:09 richard 1051 # Revision 1.4 2002/01/14 06:51:09 richard
1046 # . #503164 ] create and passwords 1052 # . #503164 ] create and passwords

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