Skip to content

Commit ff80c74

Browse files
author
Richard Jones
committed
Some cleanups in roundup-admin, also made it work again...
1 parent bb35229 commit ff80c74

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

roundup-admin

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1717
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1818
#
19-
# $Id: roundup-admin,v 1.53 2001-12-13 00:20:00 richard Exp $
19+
# $Id: roundup-admin,v 1.54 2001-12-15 23:09:23 richard Exp $
2020

2121
# python version check
2222
from roundup import version_check
2323

24-
import string, os, getpass, getopt, re, UserDict
24+
import sys, os, getpass, getopt, re, UserDict
2525
try:
2626
import csv
2727
except ImportError:
@@ -247,7 +247,7 @@ Command help:
247247
if len(args) < 2:
248248
raise UsageError, 'Not enough arguments supplied'
249249
propname = args[0]
250-
designators = string.split(args[1], ',')
250+
designators = args[1].split(',')
251251
l = []
252252
for designator in designators:
253253
# decode the node designator
@@ -286,7 +286,7 @@ Command help:
286286
raise UsageError, 'Not enough arguments supplied'
287287
from roundup import hyperdb
288288

289-
designators = string.split(args[0], ',')
289+
designators = args[0].split(',')
290290
props = {}
291291
for prop in args[1:]:
292292
if prop.find('=') == -1:
@@ -622,7 +622,7 @@ Command help:
622622
props.append((spec, len(spec)))
623623

624624
# now display the heading
625-
print ' '.join([string.capitalize(name) for name, width in props])
625+
print ' '.join([name.capitalize() for name, width in props])
626626

627627
# and the table data
628628
for nodeid in cl.list():
@@ -700,7 +700,7 @@ Command help:
700700
'''
701701
if len(args) < 1:
702702
raise UsageError, 'Not enough arguments supplied'
703-
designators = string.split(args[0], ',')
703+
designators = args[0].split(',')
704704
for designator in designators:
705705
try:
706706
classname, nodeid = roundupdb.splitDesignator(designator)
@@ -724,7 +724,7 @@ Command help:
724724
'''
725725
if len(args) < 2:
726726
raise UsageError, 'Not enough arguments supplied'
727-
classes = string.split(args[0], ',')
727+
classes = args[0].split(',')
728728
dir = args[1]
729729

730730
# use the csv parser if we can - it's faster
@@ -738,7 +738,7 @@ Command help:
738738
except KeyError:
739739
raise UsageError, 'no such class "%s"'%classname
740740
f = open(os.path.join(dir, classname+'.csv'), 'w')
741-
f.write(string.join(cl.properties.keys(), ':') + '\n')
741+
f.write(':'.join(cl.properties.keys()) + '\n')
742742

743743
# all nodes for this class
744744
properties = cl.properties.items()
@@ -978,6 +978,10 @@ if __name__ == '__main__':
978978

979979
#
980980
# $Log: not supported by cvs2svn $
981+
# Revision 1.53 2001/12/13 00:20:00 richard
982+
# . Centralised the python version check code, bumped version to 2.1.1 (really
983+
# needs to be 2.1.2, but that isn't released yet :)
984+
#
981985
# Revision 1.52 2001/12/12 21:47:45 richard
982986
# . Message author's name appears in From: instead of roundup instance name
983987
# (which still appears in the Reply-To:)

0 commit comments

Comments
 (0)