[Python-checkins] python/dist/src/Lib imputil.py,1.25,1.26

jhylton@users.sourceforge.net jhylton@users.sourceforge.net
Fri, 28 Jun 2002 16:32:53 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv11632

Modified Files:
	imputil.py 
Log Message:
Close SF patch 523944: importing modules with foreign newlines.

Didn't use the patch, because universal newlines support made it easy.
It might be worth fixing the actual problem in the 2.2 maintenance
branch, in which case the patch is still needed.


Index: imputil.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/imputil.py,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** imputil.py	1 Jun 2002 19:51:15 -0000	1.25
--- imputil.py	28 Jun 2002 23:32:51 -0000	1.26
***************
*** 411,415 ****
      modification timestamp must be provided as a Long value.
      """
!     codestring = open(pathname, 'r').read()
      if codestring and codestring[-1] != '\n':
          codestring = codestring + '\n'
--- 411,415 ----
      modification timestamp must be provided as a Long value.
      """
!     codestring = open(pathname, 'rU').read()
      if codestring and codestring[-1] != '\n':
          codestring = codestring + '\n'