]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph.in: fix exception when pool name has non-ascii characters 9167/head
authorRicardo Dias <rdias@suse.com>
Tue, 17 May 2016 17:04:28 +0000 (18:04 +0100)
committerRicardo Dias <rdias@suse.com>
Tue, 17 May 2016 20:54:56 +0000 (21:54 +0100)
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>
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: