Commit 79c8671c authored by Tim Peters's avatar Tim Peters

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.
parent 9178af14
......@@ -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():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment