Find the full path to a command using which.
(cmd)
| 32 | #----------------------------------------------------------------------------- |
| 33 | |
| 34 | def _find_cmd(cmd): |
| 35 | """Find the full path to a command using which.""" |
| 36 | |
| 37 | path = sp.Popen(['/usr/bin/env', 'which', cmd], |
| 38 | stdout=sp.PIPE, stderr=sp.PIPE).communicate()[0] |
| 39 | return py3compat.decode(path) |
| 40 | |
| 41 | |
| 42 | class ProcessHandler(object): |
nothing calls this directly
no outgoing calls
no test coverage detected