Initialize deque with path string (#48734)
This commit is contained in:
parent
b8e448afa0
commit
cc9e0137df
@ -1472,7 +1472,7 @@ def set_executable(path):
|
|||||||
def recursive_mtime_greater_than(path: str, time: float) -> bool:
|
def recursive_mtime_greater_than(path: str, time: float) -> bool:
|
||||||
"""Returns true if any file or dir recursively under `path` has mtime greater than `time`."""
|
"""Returns true if any file or dir recursively under `path` has mtime greater than `time`."""
|
||||||
# use bfs order to increase likelihood of early return
|
# use bfs order to increase likelihood of early return
|
||||||
queue: Deque[str] = collections.deque(path)
|
queue: Deque[str] = collections.deque([path])
|
||||||
|
|
||||||
if os.stat(path).st_mtime > time:
|
if os.stat(path).st_mtime > time:
|
||||||
return True
|
return True
|
||||||
|
Loading…
Reference in New Issue
Block a user