]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Fix errors found by pyflakes
authorJosh Durgin <josh.durgin@inktank.com>
Fri, 21 Sep 2012 23:44:35 +0000 (16:44 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Fri, 21 Sep 2012 23:46:24 +0000 (16:46 -0700)
A bunch of unused imports and variables.

teuthology/misc.py
teuthology/nuke.py
teuthology/task/blktrace.py
teuthology/task/die_on_err.py
teuthology/task/kernel.py
teuthology/task/object_source_down.py
teuthology/task/osd_recovery.py
teuthology/task/parallel_example.py
teuthology/task/radosgw-admin.py
teuthology/task/rbd_fsx.py

index f09486a9ba7aea3608ab43b7916757ba182a7cc2..7e5c8d42e8f97ded2dbf7a5da6c6892e32b8d7d7 100644 (file)
@@ -11,7 +11,6 @@ import urllib2
 import urlparse
 import yaml
 import json
-import subprocess
 
 from teuthology import safepath
 from .orchestra import run
index 09f1544a857ed0328fb5b34194dc99b05a2d8dc5..e90192ceb82ee3acc70a59fd48476631ae9fa720 100644 (file)
@@ -1,6 +1,5 @@
 import argparse
 import yaml
-import subprocess
 
 def parse_args():
     from teuthology.run import config_file
index deae6c2b777640fa38aa8f8754007ffc041e8519..342887b34df30edb3d257d3279482a0617491cf5 100644 (file)
@@ -1,10 +1,5 @@
-from cStringIO import StringIO
-
 import contextlib
 import logging
-import os
-import re
-import yaml
 
 from teuthology import misc as teuthology
 from teuthology import contextutil
@@ -20,7 +15,7 @@ def setup(ctx, config):
     osds = ctx.cluster.only(teuthology.is_type('osd'))
     for remote, roles_for_host in osds.remotes.iteritems():
         log.info('Creating %s on %s' % (log_dir,remote.name))
-        proc = remote.run(
+        remote.run(
             args=['mkdir', '-p', '-m0755', '--', log_dir],
             wait=False,
             )
@@ -32,7 +27,6 @@ def execute(ctx, config):
     osds = ctx.cluster.only(teuthology.is_type('osd'))
     for remote, roles_for_host in osds.remotes.iteritems():
         roles_to_devs = ctx.disk_config.remote_to_roles_to_dev[remote]
-        roles_to_journals = ctx.disk_config.remote_to_roles_to_journals[remote]
         for id_ in teuthology.roles_of_type(roles_for_host, 'osd'):
             if roles_to_devs.get(id_):
                 dev = roles_to_devs[id_]
index 4a7112d33222285f57c49669becb1bc4a3094d37..cfbda38cc4613f1ab05b88fb254e9cfa4ace11df 100644 (file)
@@ -1,6 +1,5 @@
 import contextlib
 import logging
-import os
 import time
 from ..orchestra import run
 
index 156a6efde585d52341739f250be2c90f22587aaa..5c34433d91af030c3ae353331cd71d4ebebdca23 100644 (file)
@@ -289,7 +289,7 @@ def enable_disable_kdb(ctx, config):
         (role_remote,) = ctx.cluster.only(role).remotes.keys()
         if enable:
             log.info('Enabling kdb on {role}...'.format(role=role))
-            proc = role_remote.run(
+            role_remote.run(
                 args=[
                     'echo', 'ttyS1',
                     run.Raw('|'),
@@ -297,7 +297,7 @@ def enable_disable_kdb(ctx, config):
                     ])
         else:
             log.info('Disabling kdb on {role}...'.format(role=role))
-            proc = role_remote.run(
+            role_remote.run(
                 args=[
                     'echo', '',
                     run.Raw('|'),
index 7c69f91bb14a89f135e41f678040b816182844cc..dda6f04f927e63c06bef688bfb3f7ca8d19e27e8 100644 (file)
@@ -1,7 +1,6 @@
 import logging
 import ceph_manager
 from teuthology import misc as teuthology
-import time
 
 
 log = logging.getLogger(__name__)
index 27c2fdd7f61361a65b88f3af5aa9dc89e38943a7..1f013640d48f50ef8551f5972a67a401fc9f9b05 100644 (file)
@@ -86,7 +86,7 @@ def task(ctx, config):
 
     # write some more (make sure osd.2 really is divergent)
     p = rados_start(mon, ['-p', 'rbd', 'bench', '15', 'write', '-b', '4096'])
-    err = p.exitstatus.get();
+    p.exitstatus.get();
 
     # revive divergent osd
     manager.revive_osd(2)
@@ -141,13 +141,13 @@ def test_incomplete_pgs(ctx, config):
 
     # lots of objects in rbd (no pg log, will backfill)
     p = rados_start(mon, ['-p', 'rbd', 'bench', '30', 'write', '-b', '4096'])
-    err = p.exitstatus.get()
+    p.exitstatus.get()
 
     # few objects in metadata pool (with pg log, normal recovery)
     for f in range(1, 20):
         p = rados_start(mon, ['-p', 'metadata', 'put',
                               'foo.%d' % f, '/etc/passwd'])
-        err = p.exitstatus.get()
+        p.exitstatus.get()
 
     # move it back
     manager.raw_cluster_cmd('osd', 'in', '0', '1')
index 4926259e4fba0bfa0ec2b2199f8d9fc8a076b623..43fb187cb4257bb8939c921495c47bc6e16a39c7 100644 (file)
@@ -1,6 +1,5 @@
 import contextlib
 import logging
-import yaml
 
 from teuthology import misc as teuthology
 from teuthology import contextutil
@@ -40,7 +39,7 @@ def task(ctx, config):
 
     """Take car of some yaml parsing here"""
     if config is not None and not isinstance(config, list) and not isinstance(config, dict):
-        assert(false), "task parallel_example only supports a list or dictionary for configuration"
+        assert(False), "task parallel_example only supports a list or dictionary for configuration"
     if config is None:
         config = ['client.{id}'.format(id=id_)
                   for id_ in teuthology.all_roles_of_type(ctx.cluster, 'client')] 
index a8fd04e807bcc15f01925c582bfbc291e71dbc8f..fd3025e9de76a27f2d65512522e252043e584a77 100644 (file)
@@ -249,7 +249,7 @@ def task(ctx, config):
     # the 5th should fail.
     failed = False
     try:
-        bucket5 = connection.create_bucket(bucket_name + '5')
+        connection.create_bucket(bucket_name + '5')
     except:
         failed = True
     assert failed
index 694ca58690cd5ada383bc4f8cacb8e159d03aa6d..d2973babddbf61d091660cbac73b8ba459968bac 100644 (file)
@@ -1,7 +1,6 @@
 import contextlib
 import logging
 
-from ..orchestra import run
 from teuthology.parallel import parallel
 
 log = logging.getLogger(__name__)