diff --git a/twander.py b/twander.py index 38e1e11..d4db77c 100755 --- a/twander.py +++ b/twander.py @@ -1,12 +1,12 @@ #!/usr/bin/env python # twander - Wander around the file system -# Copyright (c) 2002-2007 TundraWare Inc. All Rights Reserved. +# Copyright (c) 2002-2009 TundraWare Inc. All Rights Reserved. # For Updates See: http://www.tundraware.com/Software/twander # Program Information PROGNAME = "twander" -RCSID = "$Id: twander.py,v 3.224 2007/01/11 07:08:31 tundra Exp $" +RCSID = "$Id: twander.py,v 3.225 2009/06/27 22:17:56 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -1077,21 +1077,16 @@ else: norms = (1, "") - # Scale the results + # Scale the results and convert into a string factor = norms[0] - div, rem = flen/factor, flen%factor + if (factor > 1): + flen = float(flen)/factor + flen = "%.1f" % flen + else: + flen = str(flen) - # If remainder is >= half the scaling factor, bump the count - # up one Do not do this when we want the actual length - - # i.e., When the scaling factor is 1. - - if (factor > 1) and (rem >= factor/2): - div += 1 - - # Make a string to return out of the result - - flen = str(div) + norms[1] + flen += norms[1] return flen