This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author nobody
Recipients
Date 2001-03-19.17:08:11
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Hello, I tried to diff two directories, using
filecmp.dircmp class.

I have Python2.0 installed from source in Debian
(Potato).

The code is the following:
#!/tmp/bin/python
import filecmp
from filecmp import dircmp
a = dircmp('lala','loulou')

b = a.report_full_closure()

print b

It yields:

	hargikas@simula:~/src/mydiff$ ./mydiff.py
	diff lala loulou
	Only in loulou : ['kiko']	
	Traceback (most recent call last):
	  File "./mydiff.py", line 6, in ?
	    b = a.report_full_closure()
	  File "/tmp/lib/python2.0/filecmp.py", line 264,
in 			report_full_closure
	    self.report()
	  File "/tmp/lib/python2.0/filecmp.py", line 241, in
report
	    if self.same_files:
	  File "/tmp/lib/python2.0/filecmp.py", line 147, in
__getattr__
	    self.phase3()
	  File "/tmp/lib/python2.0/filecmp.py", line 214, in
phase3
	    xx = cmpfiles(self.left, self.right,
self.common_files)
	  File "/tmp/lib/python2.0/filecmp.py", line 288, in
cmpfiles
	    res[_cmp(ax, bx, shallow,
use_statcache)].append(x)
	TypeError: too many arguments; expected 2, got 4

Actually the 288 line of filecmp.py is:
	res[_cmp(ax, bx, shallow, use_statcache)].append(x)
and it should be:
	res[cmp(ax, bx, shallow, use_statcache)].append(x)

NOTE the missing undescore, in the correct version.

With that changed it worked ok:
	hargikas@simula:~/src/mydiff$ ./mydiff.py
	diff lala loulou
	Only in loulou : ['kiko']
	Identical files : ['loulou']
	Differing files : ['lala']
	None

Any Ideas???

Best Regards,
Charalampos Gikas,
Virtual Trip LTD
http://www.vtrip-ltd.com
History
Date User Action Args
2007-08-23 13:53:36adminlinkissue409773 messages
2007-08-23 13:53:36admincreate