From: richard Date: Mon, 31 Dec 2001 05:20:34 +0000 (+0000) Subject: . #496360 ] table width does not work X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f48a40bcc0a02716932d5c64b82c888f61f345e4;p=roundup.git . #496360 ] table width does not work git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@486 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/CHANGES.txt b/CHANGES.txt index 54fff91..021b8bf 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -47,6 +47,7 @@ Fixed: . envelope-from is now set to the roundup-admin and not roundup itself so delivery reports aren't sent to roundup (thanks Patrick Ohly) . #495400 ] entering blanks + . #496360 ] table width does not work 2001-11-23 - 0.3.0 Feature: diff --git a/roundup-admin b/roundup-admin index f04f627..f42a1d5 100755 --- a/roundup-admin +++ b/roundup-admin @@ -16,7 +16,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: roundup-admin,v 1.58 2001-12-31 05:12:52 richard Exp $ +# $Id: roundup-admin,v 1.59 2001-12-31 05:20:34 richard Exp $ # python version check from roundup import version_check @@ -636,10 +636,17 @@ Command help: if len(args) > 1: prop_names = args[1].split(',') all_props = cl.getprops() - for prop_name in prop_names: - if not all_props.has_key(prop_name): + for spec in prop_names: + if ':' in spec: + try: + name, width = spec.split(':') + except (ValueError, TypeError): + raise UsageError, '"%s" not name:width'%spec + else: + name = spec + if not all_props.has_key(name): raise UsageError, '%s has no property "%s"'%(classname, - prop_name) + name) else: prop_names = cl.getprops().keys() @@ -651,12 +658,12 @@ Command help: name, width = spec.split(':') except (ValueError, TypeError): raise UsageError, '"%s" not name:width'%spec - props.append((spec, int(width))) + props.append((name, int(width))) else: props.append((spec, len(spec))) # now display the heading - print ' '.join([name.capitalize() for name, width in props]) + print ' '.join([name.capitalize().ljust(width) for name,width in props]) # and the table data for nodeid in cl.list(): @@ -1012,6 +1019,9 @@ if __name__ == '__main__': # # $Log: not supported by cvs2svn $ +# Revision 1.58 2001/12/31 05:12:52 richard +# actually handle the advertised response to "commit y/N?" +# # Revision 1.57 2001/12/31 05:12:01 richard # added some quoting instructions to roundup-admin #