From: <Z3...@us...> - 2011-04-13 18:51:53
|
Revision: 334 http://spd.svn.sourceforge.net/spd/?rev=334&view=rev Author: Z3po Date: 2011-04-13 18:51:47 +0000 (Wed, 13 Apr 2011) Log Message: ----------- minor fix of --wide output mode Modified Paths: -------------- branches/spd-ng/src/spdCLI.py branches/spd-ng/src/test.db Modified: branches/spd-ng/src/spdCLI.py =================================================================== --- branches/spd-ng/src/spdCLI.py 2011-02-04 16:16:47 UTC (rev 333) +++ branches/spd-ng/src/spdCLI.py 2011-04-13 18:51:47 UTC (rev 334) @@ -2,7 +2,7 @@ from optparse import OptionParser, OptionGroup from sys import stdout -from re import sub +from re import sub, search __version__ = '0.3-alpha' @@ -67,8 +67,13 @@ __keylength[key] = len(key) for value in passdict[key]: if value is not None: - if len(str(value)) > __keylength[key]: - __keylength[key] = len(str(value)) + if search('\n',str(value)): + for partvalue in value.split('\n'): + if len(str(partvalue)) > __keylength[key]: + __keylength[key] = len(str(partvalue)) + else: + if len(str(value)) > __keylength[key]: + __keylength[key] = len(str(value)) for key in passdict: stdout.write(key.ljust(__keylength[key]) + '|') @@ -87,7 +92,7 @@ stdout.write('\n' + __space) stdout.write(line.ljust(__keylength[key]) + '|') __count += 1 - __space = __space + ''.ljust(__keylength[key]) + ' ' + __space = __space + ''.ljust(__keylength[key],'>') + '>' stdout.write('\n') else: self.__ErrorHandler('printPasswords', 'output mode unknown') Modified: branches/spd-ng/src/test.db =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |