diff --git a/duplicate/core.py b/duplicate/core.py index 464bba2..af8689f 100644 --- a/duplicate/core.py +++ b/duplicate/core.py @@ -33,7 +33,7 @@ def _iterdups(dupinfo): - for key, value in dupinfo.dups.items(): + for key, value in list(dupinfo.dups.items()): if isinstance(value, DupInfo): for subobj, subkey, subvalue in _iterdups(value): yield subobj, subkey, subvalue diff --git a/duplicate/structs.py b/duplicate/structs.py index 1b0077f..79987c8 100644 --- a/duplicate/structs.py +++ b/duplicate/structs.py @@ -102,14 +102,14 @@ def __new__(cls, filtertype, dups, errors, parentobj=None, parentkey=None): return inst def __init__(self, *args, **kwargs): - super(DupInfo, self).__init__(*args, **kwargs) + super(DupInfo, self).__init__() self._filter() def _filter(self, delkey=None): dupdict = self.dups if delkey is None: - for key, value in dupdict.items(): + for key, value in list(dupdict.items()): if len(value) > 1: continue dupdict.pop(key) diff --git a/duplicate/utils/fs/common.py b/duplicate/utils/fs/common.py index f06e601..7eed81b 100644 --- a/duplicate/utils/fs/common.py +++ b/duplicate/utils/fs/common.py @@ -118,7 +118,7 @@ def _scandir(path, onerror, followlinks): if entry.is_file(follow_symlinks=False): files.append(entry) - elif entry.is_dir(followlinks): + elif entry.is_dir(): dirs.append(entry) elif entry.is_file():