diff options
author | shadchin <[email protected]> | 2022-02-10 16:44:30 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:44:30 +0300 |
commit | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch) | |
tree | 012bb94d777798f1f56ac1cec429509766d05181 /contrib/tools/python3/src/Lib/filecmp.py | |
parent | 6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff) |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'contrib/tools/python3/src/Lib/filecmp.py')
-rw-r--r-- | contrib/tools/python3/src/Lib/filecmp.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/contrib/tools/python3/src/Lib/filecmp.py b/contrib/tools/python3/src/Lib/filecmp.py index 1893f909de8..ee286da9660 100644 --- a/contrib/tools/python3/src/Lib/filecmp.py +++ b/contrib/tools/python3/src/Lib/filecmp.py @@ -13,7 +13,7 @@ Functions: import os import stat from itertools import filterfalse -from types import GenericAlias +from types import GenericAlias __all__ = ['clear_cache', 'cmp', 'dircmp', 'cmpfiles', 'DEFAULT_IGNORES'] @@ -36,9 +36,9 @@ def cmp(f1, f2, shallow=True): f2 -- Second file name - shallow -- treat files as identical if their stat signatures (type, size, - mtime) are identical. Otherwise, files are considered different - if their sizes or contents differ. [default: True] + shallow -- treat files as identical if their stat signatures (type, size, + mtime) are identical. Otherwise, files are considered different + if their sizes or contents differ. [default: True] Return value: @@ -158,12 +158,12 @@ class dircmp: ok = 1 try: a_stat = os.stat(a_path) - except OSError: + except OSError: # print('Can\'t stat', a_path, ':', why.args[1]) ok = 0 try: b_stat = os.stat(b_path) - except OSError: + except OSError: # print('Can\'t stat', b_path, ':', why.args[1]) ok = 0 @@ -249,9 +249,9 @@ class dircmp: self.methodmap[attr](self) return getattr(self, attr) - __class_getitem__ = classmethod(GenericAlias) - - + __class_getitem__ = classmethod(GenericAlias) + + def cmpfiles(a, b, common, shallow=True): """Compare common files in two directories. |