Fix ng-killall by swallowing psutil exceptions in filter

Review Request #4237 - Created Sept. 13, 2016 and submitted

Information
Nick Howard (Twitter)
pants
3840, 3869
Reviewers
pants-reviews
jsirois, kwlzn, zundel
ng-killall will fail to kill nailguns if there is a process earlier in the process list that has attributes that can't be accessed.

This patch wraps ProcessManager.process_iter's filter with a exception swallow call which allows it to continue if the filter calls a psutil error causing method.

Wrote unit tests exhibiting the behavior I was seeing and made them pass. Tried running ng-killall after the change and saw it work.

Benjy Weinberger
Kris Wilson
John Sirois
Nick Howard (Twitter)
John Sirois
Nick Howard (Twitter)
Nick Howard (Twitter)
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted as https://github.com/pantsbuild/pants/commit/3e6e2125171ee6758d1b57e329b75c48c2cba2bb
Loading...