mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 10:44:36 +08:00
Update filecmp from CPython 3.12.2
This commit is contained in:
1 parent
99a4bf5eb5
commit
c6fc9cee8e
1 file changed
+5
-8
Vendored
+5
-8
@@ -10,10 +10,7 @@ Functions:
|
||||
|
||||
"""
|
||||
|
||||
try:
|
||||
import os
|
||||
except ImportError:
|
||||
import _dummy_os as os
|
||||
import os
|
||||
import stat
|
||||
from itertools import filterfalse
|
||||
from types import GenericAlias
|
||||
@@ -160,17 +157,17 @@ class dircmp:
|
||||
a_path = os.path.join(self.left, x)
|
||||
b_path = os.path.join(self.right, x)
|
||||
|
||||
ok = 1
|
||||
ok = True
|
||||
try:
|
||||
a_stat = os.stat(a_path)
|
||||
except OSError:
|
||||
# print('Can\'t stat', a_path, ':', why.args[1])
|
||||
ok = 0
|
||||
ok = False
|
||||
try:
|
||||
b_stat = os.stat(b_path)
|
||||
except OSError:
|
||||
# print('Can\'t stat', b_path, ':', why.args[1])
|
||||
ok = 0
|
||||
ok = False
|
||||
|
||||
if ok:
|
||||
a_type = stat.S_IFMT(a_stat.st_mode)
|
||||
@@ -245,7 +242,7 @@ class dircmp:
|
||||
|
||||
methodmap = dict(subdirs=phase4,
|
||||
same_files=phase3, diff_files=phase3, funny_files=phase3,
|
||||
common_dirs = phase2, common_files=phase2, common_funny=phase2,
|
||||
common_dirs=phase2, common_files=phase2, common_funny=phase2,
|
||||
common=phase1, left_only=phase1, right_only=phase1,
|
||||
left_list=phase0, right_list=phase0)
|
||||
|
||||
|
||||
Reference in new issue
Block a user