client_python icon indicating copy to clipboard operation
client_python copied to clipboard

mark_process_dead: avoid error with bad env

Open romuald opened this issue 3 years ago • 0 comments

When the multiprocess environemnt is not properly set-up (missing environment variable) and mark_process_dead is called, the method raises an error on path.join() because the path is None which may be problematic

This commit simply ignores the cleanup when the variable is not present

Context

We are using the same library for multiprocess and non-multiprocess setups.

While the setup is obviously wrong on our part (adding mark_process_dead using atexit). I thought that check in prometheus_client would be nice addition if anyone would get in the same pitfall

romuald avatar Feb 09 '22 10:02 romuald