[ python-Bugs-979794 ] diffutil errors when comparing 2 0 byte
entries
SourceForge.net
noreply at sourceforge.net
Sun Jul 11 01:55:18 CEST 2004
Bugs item #979794, was opened at 2004-06-25 08:12
Message generated for change (Comment added) made by bcannon
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=979794&group_id=5470
Category: Python Library
Group: Python 2.3
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Robert M. Zigweid (rzigweid)
Assigned to: Barry A. Warsaw (bwarsaw)
Summary: diffutil errors when comparing 2 0 byte entries
Initial Comment:
difflib has a problem where if the two things that it is comparing are
0 byte/null that when it comes time to output the results, it errors
because a generator appears to not be properly set up.
To duplicate easily, use the diff.py utility in Tools/scripts and diff
two zero byte files.
This error does not occur if either of the objects being compared has
content.
File "diff.py", line 40, in ?
sys.stdout.writelines(diff)
File "/usr/local/lib/python2.3/difflib.py", line 1215, in context_diff
for group in
SequenceMatcher(None,a,b).get_grouped_opcodes(n):
File "/usr/local/lib/python2.3/difflib.py", line 574, in
get_grouped_opcodes
if codes[0][0] == 'equal':
IndexError: list index out of range
----------------------------------------------------------------------
>Comment By: Brett Cannon (bcannon)
Date: 2004-07-10 16:55
Message:
Logged In: YES
user_id=357491
Fixed in rev. 1.21 in CVS. Not backporting in case someone actually
relies on this behavior.
----------------------------------------------------------------------
Comment By: Barry A. Warsaw (bwarsaw)
Date: 2004-06-25 20:17
Message:
Logged In: YES
user_id=12800
Probably a dup of 980117
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=979794&group_id=5470
More information about the Python-bugs-list
mailing list