Granulate/granulate-utils

Merge duplicate logic of NoSuchProcess detection

Opened this issue · 0 comments

Jongy commented

We have 2 different implementations that detect a "NoSuchProcess" state when reading ELF files of processes -

def raise_nosuchprocess(func: Callable[P, R]) -> Callable[P, R]:
and
def translate_proc_errors(process: psutil.Process) -> Generator[None, None, None]:
.

Personally I prefer the latter, and it seems more complete. Let's remove either and fix all sites to use a single one.