Ask p4 for help on this command. If it returns an error, the command does not exist in this version of p4.
(cmd)
| 414 | |
| 415 | |
| 416 | def p4_has_command(cmd): |
| 417 | """Ask p4 for help on this command. If it returns an error, the command |
| 418 | does not exist in this version of p4. |
| 419 | """ |
| 420 | real_cmd = p4_build_cmd(["help", cmd]) |
| 421 | p = subprocess.Popen(real_cmd, stdout=subprocess.PIPE, |
| 422 | stderr=subprocess.PIPE) |
| 423 | p.communicate() |
| 424 | return p.returncode == 0 |
| 425 | |
| 426 | |
| 427 | def p4_has_move_command(): |
no test coverage detected