mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
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:
parent
9178af1455
commit
79c8671c7a
1 changed files with 1 additions and 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():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue