From ec768ba3caf93e7da2e0f7272a21b35d62895a45 Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Wed, 31 Aug 2011 14:36:01 -0700 Subject: [PATCH] Fix pyflakes warnings. --- teuthology/nuke.py | 6 ++---- teuthology/task/ceph.py | 2 +- teuthology/task/kernel.py | 4 +--- teuthology/task/lockfile.py | 4 ---- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/teuthology/nuke.py b/teuthology/nuke.py index b6907e32acae3..2db6570ab7352 100644 --- a/teuthology/nuke.py +++ b/teuthology/nuke.py @@ -1,6 +1,8 @@ import argparse import yaml +from orchestra import run + def parse_args(): from teuthology.run import config_file from teuthology.run import MergeConfig @@ -33,7 +35,6 @@ def parse_args(): return args def shutdown_daemons(ctx, log): - from orchestra import run nodes = {} for remote in ctx.cluster.remotes.iterkeys(): proc = remote.run( @@ -72,7 +73,6 @@ def shutdown_daemons(ctx, log): proc.exitstatus.get() def find_kernel_mounts(ctx, log): - from orchestra import run nodes = {} log.info('Looking for kernel mounts to handle...') for remote in ctx.cluster.remotes.iterkeys(): @@ -99,7 +99,6 @@ def remove_kernel_mounts(ctx, kernel_mounts, log): properly we should be able to just do a forced unmount, but that doesn't seem to be working, so you should reboot instead """ - from orchestra import run nodes = {} for remote in kernel_mounts: log.info('clearing kernel mount from %s', remote.name) @@ -140,7 +139,6 @@ def reboot_kernel_mounts(ctx, kernel_mounts, log): reconnect(ctx, 300) #allow 5 minutes for the reboots def remove_testing_tree(ctx, log): - from orchestra import run nodes = {} for remote in ctx.cluster.remotes.iterkeys(): proc = remote.run( diff --git a/teuthology/task/ceph.py b/teuthology/task/ceph.py index 67ec9895d0a5b..847aa07f23cb1 100644 --- a/teuthology/task/ceph.py +++ b/teuthology/task/ceph.py @@ -544,7 +544,7 @@ def cluster(ctx, config): log.info('Grabbing cluster log from %s %s...' % (mon0_remote, firstmon)) dest = os.path.join(ctx.archive, 'ceph.log') - proc = mon0_remote.run( + mon0_remote.run( args = [ 'cat', '--', diff --git a/teuthology/task/kernel.py b/teuthology/task/kernel.py index 6a2d85e802422..da79c62dd0fd9 100644 --- a/teuthology/task/kernel.py +++ b/teuthology/task/kernel.py @@ -1,11 +1,9 @@ from cStringIO import StringIO import logging -import socket -import time from teuthology import misc as teuthology -from orchestra import connection, run +from orchestra import run log = logging.getLogger(__name__) diff --git a/teuthology/task/lockfile.py b/teuthology/task/lockfile.py index b9c664e1b8ddb..c2bf41da67b9d 100644 --- a/teuthology/task/lockfile.py +++ b/teuthology/task/lockfile.py @@ -1,9 +1,7 @@ import logging -import threading import os from orchestra import run -import teuthology.misc as teuthology import time import gevent @@ -136,13 +134,11 @@ def task(ctx, config): log.debug('created files to lock') # now actually run the locktests - spawnwait = 0 for op in config: if not isinstance(op, dict): assert isinstance(op, int) or isinstance(op, float) log.info("sleeping for {sleep} seconds".format(sleep=op)) time.sleep(op) - spawnwait = 0 continue greenlet = gevent.spawn(lock_one, op, ctx) lock_procs.append((greenlet, op)) -- 2.39.5