SF patch #440144: Tests and minor bugfix for uu module

decode():  While writing tests for uu.py, Nick Mathewson discovered
that the 'Truncated input file' exception could never get raised,
because its "if not str:" test was actually testing the builtin
function "str", not the local string vrbl "s" as intended.

Bugfix candidate.
This commit is contained in:
Tim Peters 2001-07-11 04:08:49 +00:00
parent 9178af1455
commit 79c8671c7a
1 changed files with 1 additions and 1 deletions

View File

@ -135,7 +135,7 @@ def decode(in_file, out_file=None, mode=None):
sys.stderr.write("Warning: %s\n" % str(v))
out_file.write(data)
s = in_file.readline()
if not str:
if not s:
raise Error, 'Truncated input file'
def test():