From: Ricardo Dias Date: Tue, 17 May 2016 17:04:28 +0000 (+0100) Subject: ceph.in: fix exception when pool name has non-ascii characters X-Git-Tag: v10.2.2~30^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F9320%2Fhead;p=ceph.git ceph.in: fix exception when pool name has non-ascii characters When deleting a pool without the --i-really-really-mean-it option, if the pool name has non-ascii characters, the format of the command message raises a UnicodeEncodeError exception. Fixes: http://tracker.ceph.com/issues/15913 Signed-off-by: Ricardo Dias (cherry picked from commit 805873fed0135616a4cf8b499d1ba0b10dac004c) --- diff --git a/src/ceph.in b/src/ceph.in index ecc3ecaabd7..cf1210d574b 100755 --- a/src/ceph.in +++ b/src/ceph.in @@ -892,7 +892,7 @@ def main(): if ret < 0: ret = -ret - print('Error {0}: {1}'.format(errno.errorcode.get(ret, 'Unknown'), outs), file=sys.stderr) + print(u'Error {0}: {1}'.format(errno.errorcode.get(ret, 'Unknown'), outs), file=sys.stderr) if len(targets) > 1: final_ret = ret else: