Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb3c2978

Browse files
committed
fix: avoid process name lookup failure
1 parent8be3e72 commitb3c2978

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/ffpuppet/helpers.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
fromtimeimportperf_counter,sleep
1616
fromtypingimportTYPE_CHECKING
1717

18-
frompsutilimportProcess,process_iter
18+
frompsutilimportAccessDenied,NoSuchProcess,Process,process_iter
1919

2020
from .sanitizer_utilimportSanitizerOptions
2121

@@ -237,7 +237,8 @@ def files_in_use(files: Iterable[Path]) -> Generator[tuple[Path, int, str]]:
237237
withsuppress(OSError):
238238
ifcheck_file.samefile(open_file):
239239
forpidinpids:
240-
yieldopen_file,pid,Process(pid).name()
240+
withsuppress(AccessDenied,NoSuchProcess):
241+
yieldopen_file,pid,Process(pid).name()
241242
else:
242243
forprocinprocess_iter(["pid","name","open_files"]):
243244
ifnotproc.info["open_files"]:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp