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

Appearance settings

Clean up the ProcessCollector.#93

Merged
brian-brazil merged 1 commit intoprometheus:masterprometheus/client_python:masterfrom
vad:clean_process_collectorvad/client_python:clean_process_collectorCopy head branch name to clipboard
Aug 19, 2016
Merged

Clean up the ProcessCollector.#93
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

@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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.