diff options
author | Thomas Wouters <thomas@python.org> | 2001-07-11 11:38:20 (GMT) |
---|---|---|
committer | Thomas Wouters <thomas@python.org> | 2001-07-11 11:38:20 (GMT) |
commit | e27a8b97669f34a3bf50af8812fd12b346ecd17b (patch) | |
tree | 6aaa93b7fd90faff374e097039719769e5aa86f2 | |
parent | 49ba499a2436f7e638ae65b796248e2b412138d5 (diff) | |
download | cpython-e27a8b97669f34a3bf50af8812fd12b346ecd17b.zip cpython-e27a8b97669f34a3bf50af8812fd12b346ecd17b.tar.gz cpython-e27a8b97669f34a3bf50af8812fd12b346ecd17b.tar.bz2 |
Backport Tim's checkin 1.17:
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.
-rwxr-xr-x | Lib/uu.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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(): |