mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Read the text files to be compared in universal-newline mode.
This commit is contained in:
parent
ab9b32c077
commit
130e37f3e2
3 changed files with 8 additions and 4 deletions
|
@ -31,8 +31,8 @@ def main():
|
|||
|
||||
fromdate = time.ctime(os.stat(fromfile).st_mtime)
|
||||
todate = time.ctime(os.stat(tofile).st_mtime)
|
||||
fromlines = open(fromfile).readlines()
|
||||
tolines = open(tofile).readlines()
|
||||
fromlines = open(fromfile, 'U').readlines()
|
||||
tolines = open(tofile, 'U').readlines()
|
||||
|
||||
if options.u:
|
||||
diff = difflib.unified_diff(fromlines, tolines, fromfile, tofile, fromdate, todate, n=n)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue