mirror of
https://github.com/python/cpython.git
synced 2025-08-17 23:31:09 +00:00
Merged revisions 81432 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r81432 | benjamin.peterson | 2010-05-21 16:31:24 -0500 (Fri, 21 May 2010) | 1 line ensure the last line has a trailing newline #8782 ........
This commit is contained in:
parent
f28ae81741
commit
a3401654e1
3 changed files with 19 additions and 0 deletions
|
@ -133,6 +133,8 @@ def updatecache(filename, module_globals=None):
|
|||
except IOError, msg:
|
||||
## print '*** Cannot open', fullname, ':', msg
|
||||
return []
|
||||
if lines and not lines[-1].endswith('\n'):
|
||||
lines[-1] += '\n'
|
||||
size, mtime = stat.st_size, stat.st_mtime
|
||||
cache[filename] = size, mtime, lines, fullname
|
||||
return lines
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue