diff options
| author | Brian Waldon <brian.waldon@rackspace.com> | 2011-12-29 10:55:42 -0500 |
|---|---|---|
| committer | Brian Waldon <brian.waldon@rackspace.com> | 2011-12-29 14:49:00 -0500 |
| commit | d73a0046440b1c22cfb296fb0370905575739ab2 (patch) | |
| tree | 25ea36d3ca9fa10560c3beebce7792e09a5554ca | |
| parent | 783ac027f934b25e225619f9cf2cf26814fd7da6 (diff) | |
Clean up pylint errors in top-level files
Change-Id: Ida7cf1ff0cbf94ad82c7a75708c79ad7bb27f7fd
| -rw-r--r-- | nova/exception.py | 8 | ||||
| -rw-r--r-- | nova/manager.py | 2 | ||||
| -rw-r--r-- | nova/quota.py | 1 | ||||
| -rw-r--r-- | nova/test.py | 4 | ||||
| -rw-r--r-- | nova/utils.py | 3 | ||||
| -rw-r--r-- | nova/wsgi.py | 6 |
6 files changed, 8 insertions, 16 deletions
diff --git a/nova/exception.py b/nova/exception.py index 186a6ac58..f2df97964 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -24,10 +24,10 @@ SHOULD include dedicated exception logging. """ -from functools import wraps +import functools import sys -from novaclient import exceptions as novaclient_exceptions +import novaclient.exceptions import webob.exc from nova import log as logging @@ -51,7 +51,7 @@ def novaclient_converter(f): try: ret = f(*args, **kwargs) return ret - except novaclient_exceptions.ClientException, e: + except novaclient.exceptions.ClientException, e: raise ConvertedException(e.code, e.message, e.details) return new_f @@ -156,7 +156,7 @@ def wrap_exception(notifier=None, publisher_id=None, event_type=None, # re-raise original exception since it may have been clobbered raise exc_info[0], exc_info[1], exc_info[2] - return wraps(f)(wrapped) + return functools.wraps(f)(wrapped) return inner diff --git a/nova/manager.py b/nova/manager.py index 505fce345..a5e50b4b6 100644 --- a/nova/manager.py +++ b/nova/manager.py @@ -53,9 +53,9 @@ This module provides Manager, a base class for managers. """ +from nova.db import base from nova import flags from nova import log as logging -from nova.db import base from nova.scheduler import api from nova import version diff --git a/nova/quota.py b/nova/quota.py index e9ec4142f..122959c58 100644 --- a/nova/quota.py +++ b/nova/quota.py @@ -19,7 +19,6 @@ """Quotas for instances, volumes, and floating ips.""" from nova import db -from nova import exception from nova import flags diff --git a/nova/test.py b/nova/test.py index 448af047e..1fc47f507 100644 --- a/nova/test.py +++ b/nova/test.py @@ -31,13 +31,11 @@ import unittest import mox import nose.plugins.skip -import nova.image.fake -import shutil import stubout from nova import flags +import nova.image.fake from nova import log -from nova import rpc from nova import utils from nova import service from nova.testing.fake import rabbit diff --git a/nova/utils.py b/nova/utils.py index 9fb92f08d..164ee08dd 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -25,7 +25,6 @@ import functools import inspect import json import lockfile -import netaddr import os import random import re @@ -43,11 +42,11 @@ from eventlet import event from eventlet import greenthread from eventlet import semaphore from eventlet.green import subprocess +import netaddr from nova import exception from nova import flags from nova import log as logging -from nova import version LOG = logging.getLogger("nova.utils") diff --git a/nova/wsgi.py b/nova/wsgi.py index 5ca0edd45..b94065b78 100644 --- a/nova/wsgi.py +++ b/nova/wsgi.py @@ -19,20 +19,16 @@ """Utility methods for working with WSGI servers.""" -import os import sys -from xml.dom import minidom - import eventlet import eventlet.wsgi import greenlet +from paste import deploy import routes.middleware import webob.dec import webob.exc -from paste import deploy - from nova import exception from nova import flags from nova import log as logging |
