summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2001-07-11 11:38:20 (GMT)
committerThomas Wouters <thomas@python.org>2001-07-11 11:38:20 (GMT)
commite27a8b97669f34a3bf50af8812fd12b346ecd17b (patch)
tree6aaa93b7fd90faff374e097039719769e5aa86f2
parent49ba499a2436f7e638ae65b796248e2b412138d5 (diff)
downloadcpython-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-xLib/uu.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/uu.py b/Lib/uu.py
index 334d436..11a4e83 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():