comparison roundup/admin.py @ 3284:9ddf9cd8baf5

fix roundup-admin "export" so it creates the target dir if needed
author Richard Jones <richard@users.sourceforge.net>
date Wed, 13 Apr 2005 06:55:44 +0000
parents 29bde1f0d364
children 7a7f7d3a038d
comparison
equal deleted inserted replaced
3282:74db49467de8 3284:9ddf9cd8baf5
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.89 2005-02-28 03:14:49 richard Exp $ 19 # $Id: admin.py,v 1.90 2005-04-13 06:55:44 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
1051 classes = self.db.classes.keys() 1051 classes = self.db.classes.keys()
1052 1052
1053 class colon_separated(csv.excel): 1053 class colon_separated(csv.excel):
1054 delimiter = ':' 1054 delimiter = ':'
1055 1055
1056 # make sure target dir exists
1057 if not os.path.exists(dir):
1058 os.makedirs(dir)
1059
1056 # do all the classes specified 1060 # do all the classes specified
1057 for classname in classes: 1061 for classname in classes:
1058 cl = self.get_class(classname) 1062 cl = self.get_class(classname)
1059 1063
1060 f = open(os.path.join(dir, classname+'.csv'), 'w') 1064 f = open(os.path.join(dir, classname+'.csv'), 'w')

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