ceph/ceph-deploy — pull request #37 by alfredodeza (2013-08-09 22:46:39+00:00)
Title: No more KeyboardInterrupt/RuntimeError tracebacks!

This commit creates a decorator that will handle KeyboardInterrupts and RuntimeErrors, but it is also generalized enough to be used in other places to handle nicely errors.

This is the example output with both KeyboardInterrupt and RuntimeError being raised, but handled:

ceph-deploy mon create node2
[ceph_deploy.mon][DEBUG ] Deploying mon, cluster ceph hosts node2
[ceph_deploy.mon][DEBUG ] detecting platform for host node2 ...
^C[ceph_deploy][ERROR ] KeyboardInterrupt

ceph-deploy mon create node1
[ceph_deploy][ERROR ] RuntimeError: mon keyring not found; run 'new' to create a new cluster