Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Clean up the ProcessCollector. #93

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 19, 2016

Conversation

vad
Copy link
Contributor

@vad vad commented Aug 3, 2016

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

@brian-brazil
Copy link
Contributor

Thanks. Would you mind adding a small unittest for the missing file?

@vad
Copy link
Contributor Author

vad commented Aug 4, 2016

So you confirm that "return silently" is the behaviour you expect?

@brian-brazil
Copy link
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.

@vad
Copy link
Contributor Author

vad commented Aug 4, 2016

Ok, I'll write the test ASAP, probably today

@vad
Copy link
Contributor Author

vad commented Aug 17, 2016

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()

@brian-brazil
Copy link
Contributor

Can you squash your commits and update the description?

@vad vad force-pushed the clean_process_collector branch 2 times, most recently from 2ad3b92 to 215b169 Compare August 18, 2016 13:15
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
@vad vad force-pushed the clean_process_collector branch from 215b169 to 1ce94d7 Compare August 19, 2016 16:45
@vad
Copy link
Contributor Author

vad commented Aug 19, 2016

@brian-brazil is it ok?

@brian-brazil brian-brazil merged commit 9cf6f4e into prometheus:master Aug 19, 2016
@brian-brazil
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants