comparison roundup/admin.py @ 1103:db787cef1385

handled some XXXs
author Richard Jones <richard@users.sourceforge.net>
date Tue, 10 Sep 2002 12:44:42 +0000
parents c5819344714c
children b0de30171e57
comparison
equal deleted inserted replaced
1102:d94bd5369456 1103:db787cef1385
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.27 2002-09-10 07:07:16 richard Exp $ 19 # $Id: admin.py,v 1.28 2002-09-10 12:44:42 richard Exp $
20 20
21 import sys, os, getpass, getopt, re, UserDict, shlex, shutil 21 import sys, os, getpass, getopt, re, UserDict, shlex, shutil
22 try: 22 try:
23 import csv 23 import csv
24 except ImportError: 24 except ImportError:
809 raise UsageError, _('no such %(classname)s node "%(nodeid)s"')%locals() 809 raise UsageError, _('no such %(classname)s node "%(nodeid)s"')%locals()
810 return 0 810 return 0
811 811
812 def do_export(self, args): 812 def do_export(self, args):
813 '''Usage: export [class[,class]] export_dir 813 '''Usage: export [class[,class]] export_dir
814 Export the database to tab-separated-value files. 814 Export the database to colon-separated-value files.
815 815
816 This action exports the current data from the database into 816 This action exports the current data from the database into
817 tab-separated-value files that are placed in the nominated destination 817 colon-separated-value files that are placed in the nominated
818 directory. The journals are not exported. 818 destination directory. The journals are not exported.
819 ''' 819 '''
820 # we need the CSV module 820 # we need the CSV module
821 if csv is None: 821 if csv is None:
822 raise UsageError, \ 822 raise UsageError, \
823 _('Sorry, you need the csv module to use this function.\n' 823 _('Sorry, you need the csv module to use this function.\n'
860 a "header" line with those property names.) 860 a "header" line with those property names.)
861 861
862 The imported nodes will have the same nodeid as defined in the 862 The imported nodes will have the same nodeid as defined in the
863 import file, thus replacing any existing content. 863 import file, thus replacing any existing content.
864 864
865 XXX The new nodes are added to the existing database - if you want to 865 The new nodes are added to the existing database - if you want to
866 XXX create a new database using the imported data, then create a new 866 create a new database using the imported data, then create a new
867 XXX database (or, tediously, retire all the old data.) 867 database (or, tediously, retire all the old data.)
868 ''' 868 '''
869 if len(args) < 1: 869 if len(args) < 1:
870 raise UsageError, _('Not enough arguments supplied') 870 raise UsageError, _('Not enough arguments supplied')
871 if csv is None: 871 if csv is None:
872 raise UsageError, \ 872 raise UsageError, \

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