From: Tim Peters Date: Wed, 11 Jul 2001 04:08:49 +0000 (+0000) Subject: SF patch #440144: Tests and minor bugfix for uu module X-Git-Tag: v2.2a3~1276 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=79c8671c7aee3dfaeb3aa9ce14abe08cc30ecc54;p=thirdparty%2FPython%2Fcpython.git 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. --- diff --git a/Lib/uu.py b/Lib/uu.py index 334d436cd622..11a4e83f91f0 100755 --- a/Lib/uu.py +++ b/Lib/uu.py @@ -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():