From 555cec9a92568666880d70b9ae8f6e9748eca204 Mon Sep 17 00:00:00 2001 From: Ricardo Dias Date: Tue, 17 May 2016 18:04:28 +0100 Subject: [PATCH] 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) --- src/ceph.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ceph.in b/src/ceph.in index ecc3ecaabd70..cf1210d574b3 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: -- 2.47.3