jmervine/httperfpy — pull request #3 by bilthon (2013-05-13 19:06:28+00:00)
Title: Command line error detection

I was placing a completely non-existing command line argument and of course the underlying call to httperf would not return anything useful in the self.results dictionary when self.parser was set to true.

To handle that kind of situation I modified the code to call the subprocess.check_output convenience function, which throws a subprocess.CalledProcessError exception in case the process returned with a non-zero exit status.

In case the user makes a silly mistake like that, the call to run would return a dictionary with a single key called 'error' which would contain as it's value the appropriate error message from httperf.