From: Josh Durgin Date: Thu, 21 Feb 2013 22:47:00 +0000 (-0800) Subject: Fix unused vars, unused imports, and aliasing X-Git-Tag: 1.1.0~2295 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=a862d8bf7705912dbc5c1935d8599799a2e9b8d3;p=teuthology.git Fix unused vars, unused imports, and aliasing Found by pyflakes Signed-off-by: Josh Durgin --- diff --git a/teuthology/nuke.py b/teuthology/nuke.py index 0c6b8a5e04..01390da521 100644 --- a/teuthology/nuke.py +++ b/teuthology/nuke.py @@ -152,7 +152,6 @@ def remove_osd_mounts(ctx, log): unmount any osd data mounts (scratch disks) """ from .orchestra import run - from teuthology.misc import get_testdir ctx.cluster.run( args=[ 'grep', diff --git a/teuthology/task/ceph.py b/teuthology/task/ceph.py index be6b7eee33..3c69f502e7 100644 --- a/teuthology/task/ceph.py +++ b/teuthology/task/ceph.py @@ -8,7 +8,6 @@ import sys from teuthology import misc as teuthology from teuthology import contextutil -from teuthology.parallel import parallel from ..orchestra import run log = logging.getLogger(__name__) @@ -210,7 +209,6 @@ def valgrind_post(ctx, config): def mount_osd_data(ctx, remote, osd): - testdir = teuthology.get_testdir(ctx) log.debug('Mounting data for osd.{o} on {r}'.format(o=osd, r=remote)) if remote in ctx.disk_config.remote_to_roles_to_dev and osd in ctx.disk_config.remote_to_roles_to_dev[remote]: dev = ctx.disk_config.remote_to_roles_to_dev[remote][osd] @@ -308,8 +306,8 @@ def cluster(ctx, config): log.info('Generating config...') remotes_and_roles = ctx.cluster.remotes.items() - roles = [roles for (remote, roles) in remotes_and_roles] - ips = [host for (host, port) in (remote.ssh.get_transport().getpeername() for (remote, roles) in remotes_and_roles)] + roles = [role_list for (remote, role_list) in remotes_and_roles] + ips = [host for (host, port) in (remote.ssh.get_transport().getpeername() for (remote, role_list) in remotes_and_roles)] conf = teuthology.skeleton_config(ctx, roles=roles, ips=ips) for remote, roles_to_journals in remote_to_roles_to_journals.iteritems(): for role, journal in roles_to_journals.iteritems(): diff --git a/teuthology/task/install.py b/teuthology/task/install.py index 8b6025fb9f..9a745aaebf 100644 --- a/teuthology/task/install.py +++ b/teuthology/task/install.py @@ -1,10 +1,7 @@ from cStringIO import StringIO -import argparse import contextlib import logging -import os -import sys from teuthology import misc as teuthology from teuthology import contextutil diff --git a/teuthology/task/manypools.py b/teuthology/task/manypools.py index 8e02ca4d48..cf9d5b54da 100644 --- a/teuthology/task/manypools.py +++ b/teuthology/task/manypools.py @@ -28,8 +28,6 @@ def task(ctx, config): time: 360 """ - testdir = teuthology.get_testdir(ctx) - log.info('creating {n} pools'.format(n=config)) poolnum = int(config)