]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph.in: fix exception when pool name has non-ascii characters 9320/head
authorRicardo Dias <rdias@suse.com>
Tue, 17 May 2016 17:04:28 +0000 (18:04 +0100)
committerNathan Cutler <ncutler@suse.com>
Wed, 25 May 2016 11:43:54 +0000 (13:43 +0200)
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 <rdias@suse.com>
(cherry picked from commit 805873fed0135616a4cf8b499d1ba0b10dac004c)

src/ceph.in

index ecc3ecaabd709b2c86f3f7bb3500b887e8b5bdb5..cf1210d574b3eff03a62212149f2566301699f74 100755 (executable)
@@ -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: