bpo-41354: Adjust filecmp.cmp() to match documentation

This commit is contained in:
Christof Hanke 2020-07-21 11:09:59 +02:00
parent 5241e189e7
commit 43c67e9479
1 changed files with 3 additions and 3 deletions

View File

@ -53,10 +53,10 @@ def cmp(f1, f2, shallow=True):
s2 = _sig(os.stat(f2))
if s1[0] != stat.S_IFREG or s2[0] != stat.S_IFREG:
return False
if shallow and s1 == s2:
return True
if s1[1] != s2[1]:
if s1 != s2:
return False
if shallow:
return True
outcome = _cache.get((f1, f2, s1, s2))
if outcome is None: