bpo-41354: Adjust filecmp.cmp() to match documentation
This commit is contained in:
parent
5241e189e7
commit
43c67e9479
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue