]> granicus.if.org Git - python/commit
Merged revisions 83380 via svnmerge from
authorR. David Murray <rdmurray@bitdance.com>
Sun, 1 Aug 2010 04:14:22 +0000 (04:14 +0000)
committerR. David Murray <rdmurray@bitdance.com>
Sun, 1 Aug 2010 04:14:22 +0000 (04:14 +0000)
commitea6ff81323a6e68c4ce3287011d7319993c66e57
tree261fe32d926a49e07715c0e00eaa19f49a8aa090
parent5a34b7f50a822fbc1b1f9dfb429b96e3df92928b
Merged revisions 83380 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r83380 | r.david.murray | 2010-07-31 23:31:09 -0400 (Sat, 31 Jul 2010) | 17 lines

  #8620: Cmd no longer truncates last character if stdin ends without newline

  Cmd used to blindly chop off the last character of every input line.  If
  the input reached EOF and there was no final new line, it would truncate
  the last character of the last command.  This fix instead strips trailing
  \r\n from the input lines.  While this is a small behavior change, it
  should not break any working code, since feeding a '\r\n' terminated
  file to Cmd would previously leave the \r's on the lines, resulting
  in failed command execution.

  I wrote the unit test in preparation for a PyOhio TeachMe session
  run by Catherine Devlin, and we can thank Catherine and the PyOhio
  session attendees for the fix.  I've added Catherine to the Acks file
  for organizing and leading the TeachMe session, out of which we will
  hopefully get some new contributors.
........
Lib/cmd.py
Lib/test/test_cmd.py
Misc/ACKS
Misc/NEWS