summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Gordon <jogo@cloudscaling.com>2012-05-04 15:54:12 -0700
committerJoe Gordon <jogo@cloudscaling.com>2012-05-07 15:08:58 -0700
commit86dc475bd6de08c8a329a26f988d0fff8868c8a0 (patch)
tree34836d4064fdf0341a5addcbe3c75d019229bc97
parentf729925f5a3231c1b8ec2cb3c9c5fcd2bc68dbbb (diff)
downloadnova-86dc475bd6de08c8a329a26f988d0fff8868c8a0.tar.gz
nova-86dc475bd6de08c8a329a26f988d0fff8868c8a0.tar.xz
nova-86dc475bd6de08c8a329a26f988d0fff8868c8a0.zip
pylint cleanup
Mostly remove unused imports Change-Id: Icdb3ec77537b2568f4e85843bab89eb63cd17d8e
-rw-r--r--nova/api/openstack/compute/contrib/floating_ips.py1
-rw-r--r--nova/api/validator.py2
-rw-r--r--nova/cloudpipe/pipelib.py1
-rw-r--r--nova/consoleauth/manager.py2
-rw-r--r--nova/db/sqlalchemy/migration.py1
-rw-r--r--nova/network/ldapdns.py3
-rw-r--r--nova/rpc/impl_fake.py3
-rw-r--r--nova/testing/runner.py2
-rw-r--r--nova/tests/test_auth.py2
-rw-r--r--nova/utils.py4
10 files changed, 1 insertions, 20 deletions
diff --git a/nova/api/openstack/compute/contrib/floating_ips.py b/nova/api/openstack/compute/contrib/floating_ips.py
index 4a5cec8d2..11da0d770 100644
--- a/nova/api/openstack/compute/contrib/floating_ips.py
+++ b/nova/api/openstack/compute/contrib/floating_ips.py
@@ -26,7 +26,6 @@ from nova import compute
from nova import exception
from nova import log as logging
from nova import network
-from nova.rpc import common as rpc_common
LOG = logging.getLogger(__name__)
diff --git a/nova/api/validator.py b/nova/api/validator.py
index 4d4c9457a..beee370b9 100644
--- a/nova/api/validator.py
+++ b/nova/api/validator.py
@@ -21,8 +21,6 @@ import logging
import re
import socket
-from nova import exception
-
LOG = logging.getLogger(__name__)
diff --git a/nova/cloudpipe/pipelib.py b/nova/cloudpipe/pipelib.py
index 497ee6ffc..0f9f782b0 100644
--- a/nova/cloudpipe/pipelib.py
+++ b/nova/cloudpipe/pipelib.py
@@ -24,7 +24,6 @@ an instance with it.
import os
import string
-import tempfile
import zipfile
# NOTE(vish): cloud is only for the _gen_key functionality
diff --git a/nova/consoleauth/manager.py b/nova/consoleauth/manager.py
index f43dbfb61..27e3cb74d 100644
--- a/nova/consoleauth/manager.py
+++ b/nova/consoleauth/manager.py
@@ -18,8 +18,6 @@
"""Auth Components for Consoles."""
-import os
-import sys
import time
from nova import flags
diff --git a/nova/db/sqlalchemy/migration.py b/nova/db/sqlalchemy/migration.py
index 698e7875a..8658e7697 100644
--- a/nova/db/sqlalchemy/migration.py
+++ b/nova/db/sqlalchemy/migration.py
@@ -18,7 +18,6 @@
import distutils.version as dist_version
import os
-import sys
from nova.db import migration
from nova.db.sqlalchemy.session import get_engine
diff --git a/nova/network/ldapdns.py b/nova/network/ldapdns.py
index c2470e127..36ff21439 100644
--- a/nova/network/ldapdns.py
+++ b/nova/network/ldapdns.py
@@ -13,9 +13,6 @@
# under the License.
import ldap
-import os
-import shutil
-import tempfile
import time
from nova.auth import fakeldap
diff --git a/nova/rpc/impl_fake.py b/nova/rpc/impl_fake.py
index 065cca699..99c686901 100644
--- a/nova/rpc/impl_fake.py
+++ b/nova/rpc/impl_fake.py
@@ -19,10 +19,7 @@ queues. Casts will block, but this is very useful for tests.
import inspect
import json
-import signal
-import sys
import time
-import traceback
import eventlet
diff --git a/nova/testing/runner.py b/nova/testing/runner.py
index 7ddf959db..4ee88553b 100644
--- a/nova/testing/runner.py
+++ b/nova/testing/runner.py
@@ -110,8 +110,6 @@ class _AnsiColorizer(object):
curses.setupterm()
return curses.tigetnum("colors") > 2
except Exception:
- raise
- # guess false in case of error
return False
supported = classmethod(supported)
diff --git a/nova/tests/test_auth.py b/nova/tests/test_auth.py
index 6549d6e96..fb35b9c5a 100644
--- a/nova/tests/test_auth.py
+++ b/nova/tests/test_auth.py
@@ -18,13 +18,11 @@
import unittest
-from nova import crypto
from nova import exception
from nova import flags
from nova import log as logging
from nova import test
from nova.auth import manager
-from nova.api.ec2 import cloud
from nova.auth import fakeldap
FLAGS = flags.FLAGS
diff --git a/nova/utils.py b/nova/utils.py
index 73ede52d5..7d4cfd287 100644
--- a/nova/utils.py
+++ b/nova/utils.py
@@ -337,7 +337,7 @@ def debug(arg):
def generate_uid(topic, size=8):
characters = '01234567890abcdefghijklmnopqrstuvwxyz'
- choices = [random.choice(characters) for x in xrange(size)]
+ choices = [random.choice(characters) for _x in xrange(size)]
return '%s-%s' % (topic, ''.join(choices))
@@ -1090,8 +1090,6 @@ def check_isinstance(obj, cls):
if isinstance(obj, cls):
return obj
raise Exception(_('Expected object of type: %s') % (str(cls)))
- # TODO(justinsb): Can we make this better??
- return cls() # Ugly PyLint hack
def parse_server_string(server_str):