From 2218ff21a3b502f6d73d4bd36be97bc0ab48dd78 Mon Sep 17 00:00:00 2001 From: richard Date: Sat, 15 Dec 2001 23:09:23 +0000 Subject: [PATCH] Some cleanups in roundup-admin, also made it work again... git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@467 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup-admin | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/roundup-admin b/roundup-admin index 3bfaed1..2a4162e 100755 --- a/roundup-admin +++ b/roundup-admin @@ -16,12 +16,12 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: roundup-admin,v 1.53 2001-12-13 00:20:00 richard Exp $ +# $Id: roundup-admin,v 1.54 2001-12-15 23:09:23 richard Exp $ # python version check from roundup import version_check -import string, os, getpass, getopt, re, UserDict +import sys, os, getpass, getopt, re, UserDict try: import csv except ImportError: @@ -247,7 +247,7 @@ Command help: if len(args) < 2: raise UsageError, 'Not enough arguments supplied' propname = args[0] - designators = string.split(args[1], ',') + designators = args[1].split(',') l = [] for designator in designators: # decode the node designator @@ -286,7 +286,7 @@ Command help: raise UsageError, 'Not enough arguments supplied' from roundup import hyperdb - designators = string.split(args[0], ',') + designators = args[0].split(',') props = {} for prop in args[1:]: if prop.find('=') == -1: @@ -622,7 +622,7 @@ Command help: props.append((spec, len(spec))) # now display the heading - print ' '.join([string.capitalize(name) for name, width in props]) + print ' '.join([name.capitalize() for name, width in props]) # and the table data for nodeid in cl.list(): @@ -700,7 +700,7 @@ Command help: ''' if len(args) < 1: raise UsageError, 'Not enough arguments supplied' - designators = string.split(args[0], ',') + designators = args[0].split(',') for designator in designators: try: classname, nodeid = roundupdb.splitDesignator(designator) @@ -724,7 +724,7 @@ Command help: ''' if len(args) < 2: raise UsageError, 'Not enough arguments supplied' - classes = string.split(args[0], ',') + classes = args[0].split(',') dir = args[1] # use the csv parser if we can - it's faster @@ -738,7 +738,7 @@ Command help: except KeyError: raise UsageError, 'no such class "%s"'%classname f = open(os.path.join(dir, classname+'.csv'), 'w') - f.write(string.join(cl.properties.keys(), ':') + '\n') + f.write(':'.join(cl.properties.keys()) + '\n') # all nodes for this class properties = cl.properties.items() @@ -978,6 +978,10 @@ if __name__ == '__main__': # # $Log: not supported by cvs2svn $ +# Revision 1.53 2001/12/13 00:20:00 richard +# . Centralised the python version check code, bumped version to 2.1.1 (really +# needs to be 2.1.2, but that isn't released yet :) +# # Revision 1.52 2001/12/12 21:47:45 richard # . Message author's name appears in From: instead of roundup instance name # (which still appears in the Reply-To:) -- 2.30.2