Possible small bugs in counter.py and auth_handler.py?

Van Gale cgale1@h...
Fri, 8 Jun 2001 02:17:38 -0700

I've really only been using Python since version 2.1, so I'm not aware of
all the issues involved in porting older code, however I *think* I have
found an inconsequential bug in counter.py related to differences in long()
vs. string.atol.

In counter.py, it seems the __str__ method is chopping off the last digit of
the counter because of a [:-1] slice on the string returned by str(long()).

If I change the line

>>> return str(long(self.value))[:-1]


>>> return str(long(self.value))

printing the counter now works correctly.

The method "make_nonce" in auth_handler.py seems to be doing the same thing
(found by simply doing a grep for [:-1])

Van Gale