From e63111669ca204bce5fc18d1dc1dd80454eab20f Mon Sep 17 00:00:00 2001 From: QuantumEnergyE Date: Wed, 30 Nov 2022 23:20:39 +0800 Subject: [PATCH] Remove unnecessary code of dirsnapshot.py --- src/watchdog/utils/dirsnapshot.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/watchdog/utils/dirsnapshot.py b/src/watchdog/utils/dirsnapshot.py index 8b4996941..5a4e1e8eb 100644 --- a/src/watchdog/utils/dirsnapshot.py +++ b/src/watchdog/utils/dirsnapshot.py @@ -255,8 +255,7 @@ def __init__(self, path, recursive=True, def walk(self, root): try: - paths = [os.path.join(root, entry if isinstance(entry, str) else entry.name) - for entry in self.listdir(root)] + paths = [os.path.join(root, entry.name) for entry in self.listdir(root)] except OSError as e: # Directory may have been deleted between finding it in the directory # list of its parent and trying to delete its contents. If this