]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/ceph_argparse: fix cli output info 17667/head
authorLuo Kexue <luo.kexue@zte.com.cn>
Tue, 12 Sep 2017 07:20:04 +0000 (15:20 +0800)
committerLuo Kexue <luo.kexue@zte.com.cn>
Wed, 13 Sep 2017 01:03:06 +0000 (09:03 +0800)
Signed-off-by: Luo Kexue <luo.kexue@zte.com.cn>
src/pybind/ceph_argparse.py

index cc96d7708dc95668453e0d3374a333ca751f9b8f..b910877e605ff9c28b24aa9e5a12cbcc08a294e4 100644 (file)
@@ -1073,8 +1073,9 @@ def validate_command(sigdict, args, verbose=False):
                 break
 
         if not found:
-            print('no valid command found; 10 closest matches:', file=sys.stderr)
-            for cmdsig in bestcmds[:10]:
+            bestcmds = bestcmds[:10]
+            print('no valid command found; {0} closest matches:'.format(len(bestcmds)), file=sys.stderr)
+            for cmdsig in bestcmds:
                 for (cmdtag, cmd) in cmdsig.items():
                     print(concise_sig(cmd['sig']), file=sys.stderr)
             return None