From bd9abc1b47daf5016e97a5c905db77d02e3a78f6 Mon Sep 17 00:00:00 2001 From: Stanislaw Pitucha Date: Thu, 13 Jun 2013 13:57:15 +0000 Subject: [PATCH] Remove trivial cases of unused variables (1) Kill some of the variables marked as unused by flakes8. This should allow to enable F841 check in the future. Only trivial cases with no function calls and obviously pure functions (like datetime.now(), or len()) are cleaned up here. Part 1, split to reduce conflicts. Change-Id: I82854349574ec4bcb9336aba626eefdaed81a8c8 --- nova/scheduler/filters/trusted_filter.py | 2 +- nova/service.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nova/scheduler/filters/trusted_filter.py b/nova/scheduler/filters/trusted_filter.py index bb1962ebe..522a68096 100644 --- a/nova/scheduler/filters/trusted_filter.py +++ b/nova/scheduler/filters/trusted_filter.py @@ -153,7 +153,7 @@ class AttestationService(object): return httplib.OK, res return status_code, None - except (socket.error, IOError) as e: + except (socket.error, IOError): return IOError, None def _request(self, cmd, subcmd, hosts): diff --git a/nova/service.py b/nova/service.py index 0377ba44b..715040323 100644 --- a/nova/service.py +++ b/nova/service.py @@ -286,7 +286,7 @@ class Service(service.Service): """Perform basic config checks before starting processing.""" # Make sure the tempdir exists and is writable try: - with utils.tempdir() as tmpdir: + with utils.tempdir(): pass except Exception as e: LOG.error(_('Temporary directory is invalid: %s'), e)