disable-msg -> disable

This commit is contained in:
Brian Lamar
2011-03-18 09:56:05 -04:00
parent e353ab287a
commit 971e164362
14 changed files with 27 additions and 27 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
# pylint: disable-msg=C0103 # pylint: disable=C0103
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the # Copyright 2010 United States Government as represented by the

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
# pylint: disable-msg=C0103 # pylint: disable=C0103
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the # Copyright 2010 United States Government as represented by the

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
# pylint: disable-msg=C0103 # pylint: disable=C0103
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the # Copyright 2010 United States Government as represented by the

View File

@@ -50,7 +50,7 @@ if __name__ == '__main__':
if __name__ == '__builtin__': if __name__ == '__builtin__':
LOG.warn(_('Starting instance monitor')) LOG.warn(_('Starting instance monitor'))
# pylint: disable-msg=C0103 # pylint: disable=C0103
monitor = monitor.InstanceMonitor() monitor = monitor.InstanceMonitor()
# This is the parent service that twistd will be looking for when it # This is the parent service that twistd will be looking for when it

View File

@@ -49,4 +49,4 @@ if __name__ == '__main__':
twistd.serve(__file__) twistd.serve(__file__)
if __name__ == '__builtin__': if __name__ == '__builtin__':
application = handler.get_application() # pylint: disable-msg=C0103 application = handler.get_application() # pylint: disable=C0103

View File

@@ -90,12 +90,12 @@ MOD_DELETE = 1
MOD_REPLACE = 2 MOD_REPLACE = 2
class NO_SUCH_OBJECT(Exception): # pylint: disable-msg=C0103 class NO_SUCH_OBJECT(Exception): # pylint: disable=C0103
"""Duplicate exception class from real LDAP module.""" """Duplicate exception class from real LDAP module."""
pass pass
class OBJECT_CLASS_VIOLATION(Exception): # pylint: disable-msg=C0103 class OBJECT_CLASS_VIOLATION(Exception): # pylint: disable=C0103
"""Duplicate exception class from real LDAP module.""" """Duplicate exception class from real LDAP module."""
pass pass
@@ -268,7 +268,7 @@ class FakeLDAP(object):
# get the attributes from the store # get the attributes from the store
attrs = store.hgetall(key) attrs = store.hgetall(key)
# turn the values from the store into lists # turn the values from the store into lists
# pylint: disable-msg=E1103 # pylint: disable=E1103
attrs = dict([(k, _from_json(v)) attrs = dict([(k, _from_json(v))
for k, v in attrs.iteritems()]) for k, v in attrs.iteritems()])
# filter the objects by query # filter the objects by query
@@ -283,6 +283,6 @@ class FakeLDAP(object):
return objects return objects
@property @property
def __prefix(self): # pylint: disable-msg=R0201 def __prefix(self): # pylint: disable=R0201
"""Get the prefix to use for all keys.""" """Get the prefix to use for all keys."""
return 'ldap:' return 'ldap:'

View File

@@ -634,6 +634,6 @@ class LdapDriver(object):
class FakeLdapDriver(LdapDriver): class FakeLdapDriver(LdapDriver):
"""Fake Ldap Auth driver""" """Fake Ldap Auth driver"""
def __init__(self): # pylint: disable-msg=W0231 def __init__(self): # pylint: disable=W0231
__import__('nova.auth.fakeldap') __import__('nova.auth.fakeldap')
self.ldap = sys.modules['nova.auth.fakeldap'] self.ldap = sys.modules['nova.auth.fakeldap']

View File

@@ -22,7 +22,7 @@ Nova authentication management
import os import os
import shutil import shutil
import string # pylint: disable-msg=W0402 import string # pylint: disable=W0402
import tempfile import tempfile
import uuid import uuid
import zipfile import zipfile

View File

@@ -62,7 +62,7 @@ class Connection(carrot_connection.BrokerConnection):
params['backend_cls'] = fakerabbit.Backend params['backend_cls'] = fakerabbit.Backend
# NOTE(vish): magic is fun! # NOTE(vish): magic is fun!
# pylint: disable-msg=W0142 # pylint: disable=W0142
if new: if new:
return cls(**params) return cls(**params)
else: else:
@@ -114,7 +114,7 @@ class Consumer(messaging.Consumer):
if self.failed_connection: if self.failed_connection:
# NOTE(vish): connection is defined in the parent class, we can # NOTE(vish): connection is defined in the parent class, we can
# recreate it as long as we create the backend too # recreate it as long as we create the backend too
# pylint: disable-msg=W0201 # pylint: disable=W0201
self.connection = Connection.recreate() self.connection = Connection.recreate()
self.backend = self.connection.create_backend() self.backend = self.connection.create_backend()
self.declare() self.declare()
@@ -125,7 +125,7 @@ class Consumer(messaging.Consumer):
# NOTE(vish): This is catching all errors because we really don't # NOTE(vish): This is catching all errors because we really don't
# want exceptions to be logged 10 times a second if some # want exceptions to be logged 10 times a second if some
# persistent failure occurs. # persistent failure occurs.
except Exception: # pylint: disable-msg=W0703 except Exception: # pylint: disable=W0703
if not self.failed_connection: if not self.failed_connection:
LOG.exception(_("Failed to fetch message from queue")) LOG.exception(_("Failed to fetch message from queue"))
self.failed_connection = True self.failed_connection = True

View File

@@ -51,7 +51,7 @@ class HyperVTestCase(test.TestCase):
instance_ref = db.instance_create(self.context, instance) instance_ref = db.instance_create(self.context, instance)
conn = hyperv.get_connection(False) conn = hyperv.get_connection(False)
conn._create_vm(instance_ref) # pylint: disable-msg=W0212 conn._create_vm(instance_ref) # pylint: disable=W0212
found = [n for n in conn.list_instances() found = [n for n in conn.list_instances()
if n == instance_ref['name']] if n == instance_ref['name']]
self.assertTrue(len(found) == 1) self.assertTrue(len(found) == 1)

View File

@@ -179,7 +179,7 @@ class ObjectStoreTestCase(test.TestCase):
class TestHTTPChannel(http.HTTPChannel): class TestHTTPChannel(http.HTTPChannel):
"""Dummy site required for twisted.web""" """Dummy site required for twisted.web"""
def checkPersistence(self, _, __): # pylint: disable-msg=C0103 def checkPersistence(self, _, __): # pylint: disable=C0103
"""Otherwise we end up with an unclean reactor.""" """Otherwise we end up with an unclean reactor."""
return False return False
@@ -209,7 +209,7 @@ class S3APITestCase(test.TestCase):
root = S3() root = S3()
self.site = TestSite(root) self.site = TestSite(root)
# pylint: disable-msg=E1101 # pylint: disable=E1101
self.listening_port = reactor.listenTCP(0, self.site, self.listening_port = reactor.listenTCP(0, self.site,
interface='127.0.0.1') interface='127.0.0.1')
# pylint: enable-msg=E1101 # pylint: enable-msg=E1101
@@ -231,11 +231,11 @@ class S3APITestCase(test.TestCase):
self.conn.get_http_connection = get_http_connection self.conn.get_http_connection = get_http_connection
def _ensure_no_buckets(self, buckets): # pylint: disable-msg=C0111 def _ensure_no_buckets(self, buckets): # pylint: disable=C0111
self.assertEquals(len(buckets), 0, "Bucket list was not empty") self.assertEquals(len(buckets), 0, "Bucket list was not empty")
return True return True
def _ensure_one_bucket(self, buckets, name): # pylint: disable-msg=C0111 def _ensure_one_bucket(self, buckets, name): # pylint: disable=C0111
self.assertEquals(len(buckets), 1, self.assertEquals(len(buckets), 1,
"Bucket list didn't have exactly one element in it") "Bucket list didn't have exactly one element in it")
self.assertEquals(buckets[0].name, name, "Wrong name") self.assertEquals(buckets[0].name, name, "Wrong name")

View File

@@ -124,7 +124,7 @@ class ApiEc2TestCase(test.TestCase):
self.mox.StubOutWithMock(self.ec2, 'new_http_connection') self.mox.StubOutWithMock(self.ec2, 'new_http_connection')
self.http = FakeHttplibConnection( self.http = FakeHttplibConnection(
self.app, '%s:8773' % (self.host), False) self.app, '%s:8773' % (self.host), False)
# pylint: disable-msg=E1103 # pylint: disable=E1103
self.ec2.new_http_connection(host, is_secure).AndReturn(self.http) self.ec2.new_http_connection(host, is_secure).AndReturn(self.http)
return self.http return self.http

View File

@@ -40,12 +40,12 @@ def conditional_forbid(req):
class LockoutTestCase(test.TestCase): class LockoutTestCase(test.TestCase):
"""Test case for the Lockout middleware.""" """Test case for the Lockout middleware."""
def setUp(self): # pylint: disable-msg=C0103 def setUp(self): # pylint: disable=C0103
super(LockoutTestCase, self).setUp() super(LockoutTestCase, self).setUp()
utils.set_time_override() utils.set_time_override()
self.lockout = ec2.Lockout(conditional_forbid) self.lockout = ec2.Lockout(conditional_forbid)
def tearDown(self): # pylint: disable-msg=C0103 def tearDown(self): # pylint: disable=C0103
utils.clear_time_override() utils.clear_time_override()
super(LockoutTestCase, self).tearDown() super(LockoutTestCase, self).tearDown()

View File

@@ -300,7 +300,7 @@ msgstr ""
msgid "instance %s: starting..." msgid "instance %s: starting..."
msgstr "" msgstr ""
#. pylint: disable-msg=W0702 #. pylint: disable=W0702
#: ../nova/compute/manager.py:219 #: ../nova/compute/manager.py:219
#, python-format #, python-format
msgid "instance %s: Failed to spawn" msgid "instance %s: Failed to spawn"
@@ -440,7 +440,7 @@ msgid ""
"instance %(instance_id)s: attaching volume %(volume_id)s to %(mountpoint)s" "instance %(instance_id)s: attaching volume %(volume_id)s to %(mountpoint)s"
msgstr "" msgstr ""
#. pylint: disable-msg=W0702 #. pylint: disable=W0702
#. NOTE(vish): The inline callback eats the exception info so we #. NOTE(vish): The inline callback eats the exception info so we
#. log the traceback here and reraise the same #. log the traceback here and reraise the same
#. ecxception below. #. ecxception below.
@@ -591,7 +591,7 @@ msgstr ""
msgid "Starting Bridge interface for %s" msgid "Starting Bridge interface for %s"
msgstr "" msgstr ""
#. pylint: disable-msg=W0703 #. pylint: disable=W0703
#: ../nova/network/linux_net.py:314 #: ../nova/network/linux_net.py:314
#, python-format #, python-format
msgid "Hupping dnsmasq threw %s" msgid "Hupping dnsmasq threw %s"
@@ -602,7 +602,7 @@ msgstr ""
msgid "Pid %d is stale, relaunching dnsmasq" msgid "Pid %d is stale, relaunching dnsmasq"
msgstr "" msgstr ""
#. pylint: disable-msg=W0703 #. pylint: disable=W0703
#: ../nova/network/linux_net.py:358 #: ../nova/network/linux_net.py:358
#, python-format #, python-format
msgid "killing radvd threw %s" msgid "killing radvd threw %s"
@@ -613,7 +613,7 @@ msgstr ""
msgid "Pid %d is stale, relaunching radvd" msgid "Pid %d is stale, relaunching radvd"
msgstr "" msgstr ""
#. pylint: disable-msg=W0703 #. pylint: disable=W0703
#: ../nova/network/linux_net.py:449 #: ../nova/network/linux_net.py:449
#, python-format #, python-format
msgid "Killing dnsmasq threw %s" msgid "Killing dnsmasq threw %s"