mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
ceph-disk: --verbose shows a stack trace on error
When running with --verbose, do not hide the stack trace from the user when an exception is raised. It is most helpful to figure out when the exception actually happened. Signed-off-by: Loic Dachary <ldachary@redhat.com>
This commit is contained in:
parent
aac8971988
commit
2fca91eb2a
@ -3175,8 +3175,15 @@ def main():
|
||||
setup_statedir(args.statedir)
|
||||
setup_sysconfdir(args.sysconfdir)
|
||||
|
||||
try:
|
||||
if args.verbose:
|
||||
args.func(args)
|
||||
else:
|
||||
main_catch(args.func, args)
|
||||
|
||||
def main_catch(func, args):
|
||||
|
||||
try:
|
||||
func(args)
|
||||
|
||||
except Error as e:
|
||||
raise SystemExit(
|
||||
|
Loading…
Reference in New Issue
Block a user