]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph.in: misc cleanups
authorJohn Spray <john.spray@redhat.com>
Thu, 27 Sep 2018 09:49:37 +0000 (05:49 -0400)
committerJohn Spray <john.spray@redhat.com>
Fri, 2 Nov 2018 10:57:40 +0000 (06:57 -0400)
Get this pyflakes-clean ahead of making
changes for keyword arguments.

Signed-off-by: John Spray <john.spray@redhat.com>
src/ceph.in

index 1ad549afb35ff20ed69ca63e301e8979c9b2b4dc..5f1fb202bff258056342e08660b6791d68bbf6a6 100755 (executable)
@@ -24,7 +24,6 @@ from time import sleep
 import codecs
 import os
 import sys
-import subprocess
 import time
 import platform
 
@@ -147,7 +146,7 @@ import subprocess
 
 from ceph_argparse import \
     concise_sig, descsort_key, parse_json_funcsigs, \
-    matchnum, validate_command, find_cmd_target, \
+    validate_command, find_cmd_target, \
     json_command, run_in_thread
 
 from ceph_daemon import admin_socket, DaemonWatcher, Termsize
@@ -615,9 +614,9 @@ def new_style_command(parsed_args, cmdargs, target, sigdict, inbuf, verbose):
             ret, outbuf, outs = do_command(parsed_args, target, cmdargs, sigdict, inbuf, verbose)
         else:
             # Interactive mode (ceph cli)
-            if sys.stdin.isatty():
-                # do the command-interpreter looping
-                # for input to do readline cmd editing
+            if sys.stdin.isatty():  
+                # do the command-interpreter looping    
+                # for input to do readline cmd editing    
                 import readline  # noqa
 
             while True:
@@ -662,8 +661,6 @@ def complete(sigdict, args, target):
     """
     # XXX this looks a lot like the front of validate_command().  Refactor?
 
-    complete_verbose = 'COMPVERBOSE' in os.environ
-
     # Repulsive hack to handle tell: lop off 'tell' and target
     # and validate the rest of the command.  'target' is already
     # determined in our callers, so it's ok to remove it here.
@@ -929,8 +926,6 @@ def main():
     # For now, --admin-daemon is handled as usual.  Try it
     # first in case we can't connect() to the cluster
 
-    format = parsed_args.output_format
-
     done, ret = maybe_daemon_command(parsed_args, childargs)
     if done:
         return ret
@@ -1164,7 +1159,7 @@ def main():
         if ret:
             where = '{0}.{1}'.format(*target)
             if ret > 0:
-                raise RuntimeError('Unexpeceted return code from {0}: {1}'.
+                raise RuntimeError('Unexpected return code from {0}: {1}'.
                                    format(where, ret))
             outs = 'problem getting command descriptions from {0}'.format(where)
         else: