# For now, --admin-daemon is handled as usual. Try it
# first in case we can't connect() to the cluster
if parsed_args.admin_socket:
- print admin_socket(parsed_args.admin_socket, childargs)
+ try:
+ print admin_socket(parsed_args.admin_socket, childargs)
+ except Exception as e:
+ print >> sys.stderr, 'admin_socket: {0}'.format(e)
return 0
if len(childargs) > 0 and childargs[0] == "daemon":
if len(childargs) > 2:
if childargs[1].find('/') >= 0:
- print admin_socket(childargs[1], childargs[2:])
+ try:
+ print admin_socket(childargs[1], childargs[2:])
+ except Exception as e:
+ print >> sys.stderr, 'admin_socket: {0}'.format(e)
return 0
else:
# try resolve daemon name
path = ceph_conf('admin_socket', childargs[1])
- print admin_socket(path, childargs[2:])
+ try:
+ print admin_socket(path, childargs[2:])
+ except Exception as e:
+ print >> sys.stderr, 'admin_socket: {0}'.format(e)
return 0
else:
print >> sys.stderr, 'Daemon requires at least 2 arguments'