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)