ceph/ceph — pull request #932 by alfredodeza (2013-12-11 21:23:59+00:00)
Title: replace sgdisk subprocess calls with a helper

This fixes issue 6979, but most importantly adds a couple of things to `ceph-disk` that should get used a bit more and hopefully used in the other `ceph-*` scripts.

* There was too much repetition for `subprocess.*` calls that were the same. By introducing a helper the repetition gets reduced and we now can handle errors for `subprocess` calls in one place.

* Adds 2 Exceptions, because having custom messaging in the error was needed (something that the existing ones did not provide)

* The `try/except` block at the end now just raises `SystemExit` vs. printing to `stderr` and then calling `sys.exit(1)`. Raising that exception achieves the _same_ functionality and it is just one call and easier to read.