Skip to content

Commit 088775c

Browse files
author
Richard Jones
committed
[SF#496360] table width does not work
1 parent 9bfeef3 commit 088775c

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ Fixed:
4747
. envelope-from is now set to the roundup-admin and not roundup itself so
4848
delivery reports aren't sent to roundup (thanks Patrick Ohly)
4949
. #495400 ] entering blanks
50+
. #496360 ] table width does not work
5051

5152
2001-11-23 - 0.3.0
5253
Feature:

roundup-admin

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1717
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1818
#
19-
# $Id: roundup-admin,v 1.58 2001-12-31 05:12:52 richard Exp $
19+
# $Id: roundup-admin,v 1.59 2001-12-31 05:20:34 richard Exp $
2020

2121
# python version check
2222
from roundup import version_check
@@ -636,10 +636,17 @@ Command help:
636636
if len(args) > 1:
637637
prop_names = args[1].split(',')
638638
all_props = cl.getprops()
639-
for prop_name in prop_names:
640-
if not all_props.has_key(prop_name):
639+
for spec in prop_names:
640+
if ':' in spec:
641+
try:
642+
name, width = spec.split(':')
643+
except (ValueError, TypeError):
644+
raise UsageError, '"%s" not name:width'%spec
645+
else:
646+
name = spec
647+
if not all_props.has_key(name):
641648
raise UsageError, '%s has no property "%s"'%(classname,
642-
prop_name)
649+
name)
643650
else:
644651
prop_names = cl.getprops().keys()
645652

@@ -651,12 +658,12 @@ Command help:
651658
name, width = spec.split(':')
652659
except (ValueError, TypeError):
653660
raise UsageError, '"%s" not name:width'%spec
654-
props.append((spec, int(width)))
661+
props.append((name, int(width)))
655662
else:
656663
props.append((spec, len(spec)))
657664

658665
# now display the heading
659-
print ' '.join([name.capitalize() for name, width in props])
666+
print ' '.join([name.capitalize().ljust(width) for name,width in props])
660667

661668
# and the table data
662669
for nodeid in cl.list():
@@ -1012,6 +1019,9 @@ if __name__ == '__main__':
10121019

10131020
#
10141021
# $Log: not supported by cvs2svn $
1022+
# Revision 1.58 2001/12/31 05:12:52 richard
1023+
# actually handle the advertised <cr> response to "commit y/N?"
1024+
#
10151025
# Revision 1.57 2001/12/31 05:12:01 richard
10161026
# added some quoting instructions to roundup-admin
10171027
#

0 commit comments

Comments
 (0)