]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Remove unused variables
authorZack Cerza <zack@cerza.org>
Thu, 26 Sep 2013 16:09:55 +0000 (11:09 -0500)
committerZack Cerza <zack@cerza.org>
Thu, 26 Sep 2013 19:01:56 +0000 (14:01 -0500)
(cherry picked from commit 581b6b3e977b99fc58fe25e66c933c65e38dc87c)

teuthology/misc.py
teuthology/task/install.py
teuthology/task/kcon_most.py
teuthology/task/localdir.py
teuthology/task/radosgw-admin.py
teuthology/task/rest-api.py
teuthology/task/sequential.py
teuthology/task/watch_notify_stress.py
teuthology/task_util/rgw.py

index 175720984e8ec1543134264a5be6fdd8f9c3a273..eb77fb83d5a6e8d46afbce21752f061a18557b04 100644 (file)
@@ -337,6 +337,7 @@ def move_file(remote, from_path, to_path, sudo=False):
         stdout=StringIO(),
         )
 
+
 def delete_file(remote, path, sudo=False, force=False):
     args = []
     if sudo:
@@ -345,14 +346,15 @@ def delete_file(remote, path, sudo=False, force=False):
     if force:
         args.extend(['-f'])
     args.extend([
-            '--',
-            path,
-            ])
-    proc = remote.run(
+        '--',
+        path,
+    ])
+    remote.run(
         args=args,
         stdout=StringIO(),
         )
 
+
 def remove_lines_from_file(remote, path, line_is_valid_test, string_to_test_for):
     # read in the specified file
     in_data = get_file(remote, path, False)
@@ -414,6 +416,7 @@ def remote_mktemp(remote, sudo=False):
     data = proc.stdout.getvalue()
     return data
 
+
 def create_file(remote, path, data="", permissions=str(644), sudo=False):
     """
     Create a file on the remote host.
@@ -422,15 +425,15 @@ def create_file(remote, path, data="", permissions=str(644), sudo=False):
     if sudo:
         args.append('sudo')
     args.extend([
-            'touch',
-            path,
-            run.Raw('&&'),
-            'chmod',
-            permissions,
-            '--',
-            path
-            ])
-    proc = remote.run(
+        'touch',
+        path,
+        run.Raw('&&'),
+        'chmod',
+        permissions,
+        '--',
+        path
+    ])
+    remote.run(
         args=args,
         stdout=StringIO(),
         )
@@ -438,6 +441,7 @@ def create_file(remote, path, data="", permissions=str(644), sudo=False):
     if "" != data:
         append_lines_to_file(remote, path, data, sudo)
 
+
 def get_file(remote, path, sudo=False):
     """
     Read a file from remote host into memory.
index 2b8b706188eda9e21aca4694fdab0e32ca4bed74..b96b20cbd5b8002eedb5a47c5be2724059aa2917 100644 (file)
@@ -287,7 +287,6 @@ def _update_rpm_package_list_and_install(ctx, remote, rpm, config):
     host = ctx.teuthology_config.get('gitbuilder_host',
                                      'gitbuilder.ceph.com')
     dist_release = baseparms['dist_release']
-    distro_release = baseparms['distro_release']
     start_of_url = 'http://{host}/ceph-rpm-{distro_release}-{arch}-{flavor}/{uri}'.format(host=host, **baseparms)
     ceph_release = 'ceph-release-{release}.{dist_release}.noarch'.format(
         release=RELEASE, dist_release=dist_release)
index eb5f54702db84bf072a30797f5279f69d85efdd6..ef5b06bfa9df9ca74d1b1837b72c5092b54df1fc 100644 (file)
@@ -5,6 +5,7 @@ from teuthology import misc as teuthology
 
 log = logging.getLogger(__name__)
 
+
 @contextlib.contextmanager
 def task(ctx, config):
     """
@@ -35,8 +36,6 @@ def task(ctx, config):
                   for id_ in teuthology.all_roles_of_type(ctx.cluster, 'client')]
     clients = list(teuthology.get_clients(ctx=ctx, roles=config))
 
-    testdir = teuthology.get_testdir(ctx)
-
     for id_, remote in clients:
         # TODO: Don't have to run this more than once per node (remote)
         log.info('Enable logging on client.{id} at {remote} ...'.format(
index 8b54217e44d97ad619b925609b8d89ed5b2cc83e..753362554cf48a87fe8be6ee77e1b5811601bded 100644 (file)
@@ -3,10 +3,10 @@ import logging
 import os
 
 from teuthology import misc as teuthology
-from ..orchestra import run
 
 log = logging.getLogger(__name__)
 
+
 @contextlib.contextmanager
 def task(ctx, config):
     """
index 59aef938db8d15d47f39fdd98036d30c56fd1adb..f91747305a6e69306267206c3c8b016a42db9582 100644 (file)
@@ -735,7 +735,6 @@ def task(ctx, config):
     assert err
 
     # delete should fail because ``key`` still exists
-    fails = False
     try:
         bucket.delete()
     except boto.exception.S3ResponseError as e:
index 817add29f04a4d4ce5f6c80b7bc3f7d1c38b80f7..481bd7fd8d2929aacf0190aa6d7b890d611754c4 100644 (file)
@@ -8,13 +8,12 @@ from teuthology.task.ceph import CephState
 
 log = logging.getLogger(__name__)
 
+
 @contextlib.contextmanager
 def run_rest_api_daemon(ctx, api_clients):
     if not hasattr(ctx, 'daemons'):
         ctx.daemons = CephState()
     remotes = ctx.cluster.only(teuthology.is_type('client')).remotes
-    testdir = teuthology.get_testdir(ctx)
-    coverage_dir = '{tdir}/archive/coverage'.format(tdir=testdir)
     for rems, roles in remotes.iteritems():
         for whole_id_ in roles:
             if whole_id_ in api_clients:
index 73ab7fc7885d6111ec6284751f3faccb8a30acc1..505bb65d3e7e9133909439dbbe6a1faaf17ebd10 100644 (file)
@@ -46,6 +46,6 @@ def task(ctx, config):
             exc_info = sys.exc_info()
             while stack:
                 mgr = stack.pop()
-                endr = mgr.__exit__(*exc_info)
+                mgr.__exit__(*exc_info)
         finally:
             del exc_info
index 7aec56b284132f9fbac01bc8039ae56c3a62a375..da52ba010fd870a510a8dfc40daacf5071186811 100644 (file)
@@ -32,8 +32,6 @@ def task(ctx, config):
 
     remotes = []
 
-    testdir = teuthology.get_testdir(ctx)
-
     for role in config.get('clients', ['client.0']):
         assert isinstance(role, basestring)
         PREFIX = 'client.'
index 82c387fd7ace26d2b8354d79c803e9e3b28db862..14216b92bad6694254655fe57e0e7e1f3f2d1a21 100644 (file)
@@ -113,7 +113,7 @@ def radosgw_agent_sync(ctx, agent_host, agent_port):
 def radosgw_agent_sync_all(ctx):
     if ctx.radosgw_agent.procs:
         for agent_client, c_config in ctx.radosgw_agent.config.iteritems():
-            dest_zone = zone_for_client(ctx, agent_client)
+            zone_for_client(ctx, agent_client)
             sync_host, sync_port = get_sync_agent(ctx, agent_client)
             log.debug('doing a sync via {host1}'.format(host1=sync_host))
             radosgw_agent_sync(ctx, sync_host, sync_port)