Clean up the ProcessCollector.#93
Merged
brian-brazil merged 1 commit intoprometheus:masterprometheus/client_python:masterfrom Aug 19, 2016
vad:clean_process_collectorvad/client_python:clean_process_collectorCopy head branch name to clipboard
Merged
Clean up the ProcessCollector.#93brian-brazil merged 1 commit intoprometheus:masterprometheus/client_python:masterfrom vad:clean_process_collectorvad/client_python:clean_process_collectorCopy head branch name to clipboard
brian-brazil merged 1 commit intoprometheus:masterprometheus/client_python:masterfrom
vad:clean_process_collectorvad/client_python:clean_process_collectorCopy head branch name to clipboard
Conversation
Contributor
|
Thanks. Would you mind adding a small unittest for the missing file? |
Contributor
Author
|
So you confirm that "return silently" is the behaviour you expect? |
Contributor
|
Yes. Due to races a process might disappear, and I'm betting the behaviour the user wants is to handle that gracefully rather than breaking scraping. |
Contributor
Author
|
Ok, I'll write the test ASAP, probably today |
Contributor
Author
|
Ok, in the end I looked at this only today and reverted to the old behaviour. The try/except was not around open() but around os.path.join(). IMHO it makes totally sense to raise and exception in this case, because it's probably an error in self._pid() |
Contributor
|
Can you squash your commits and update the description? |
2ad3b92 to
215b169
Compare
Code: - remove unused imports - remove a useless try/except/raise that wraps a os.path.join() Style: - max line length 119 - use 4 spaces for indentation - fix indentation of continuation lines
215b169 to
1ce94d7
Compare
Contributor
Author
|
@brian-brazil is it ok? |
Contributor
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Code:
Style: