Merge lp:~blamar/nova/pylint-deprecations into lp:~hudson-openstack/nova/trunk
- pylint-deprecations
- Merge into trunk
Proposed by
Brian Lamar
Status: | Merged |
---|---|
Approved by: | Devin Carlen |
Approved revision: | 830 |
Merged at revision: | 832 |
Proposed branch: | lp:~blamar/nova/pylint-deprecations |
Merge into: | lp:~hudson-openstack/nova/trunk |
Diff against target: |
500 lines (+49/-49) 24 files modified
bin/nova-ajax-console-proxy (+1/-1) bin/nova-api (+1/-1) bin/nova-direct-api (+1/-1) bin/nova-instancemonitor (+1/-1) bin/nova-objectstore (+1/-1) nova/auth/fakeldap.py (+5/-5) nova/auth/ldapdriver.py (+1/-1) nova/auth/manager.py (+1/-1) nova/compute/manager.py (+2/-2) nova/db/api.py (+1/-1) nova/db/base.py (+1/-1) nova/db/sqlalchemy/api.py (+1/-1) nova/network/linux_net.py (+3/-3) nova/network/manager.py (+2/-2) nova/objectstore/handler.py (+7/-7) nova/rpc.py (+3/-3) nova/service.py (+1/-1) nova/tests/api/test_wsgi.py (+1/-1) nova/tests/hyperv_unittest.py (+1/-1) nova/tests/objectstore_unittest.py (+5/-5) nova/tests/test_api.py (+1/-1) nova/tests/test_middleware.py (+2/-2) po/nova.pot (+5/-5) tools/euca-get-ajax-console (+1/-1) |
To merge this branch: | bzr merge lp:~blamar/nova/pylint-deprecations |
Related bugs: | |
Related blueprints: |
Improve Pylint Scores
(Low)
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Devin Carlen (community) | Approve | ||
justinsb (community) | Approve | ||
Christian Berendt (community) | Approve | ||
Review via email: mp+53990@code.launchpad.net |
Commit message
Description of the change
Replaced all pylint "disable-msg=" with "disable=" and "enable-msg=" with "enable=".
To post a comment you must log in.
Revision history for this message
Brian Lamar (blamar) wrote : | # |
Revision history for this message
justinsb (justin-fathomdb) wrote : | # |
lgtm
Thanks for splitting it out into separate patches.
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'bin/nova-ajax-console-proxy' | |||
2 | --- bin/nova-ajax-console-proxy 2011-02-25 21:15:51 +0000 | |||
3 | +++ bin/nova-ajax-console-proxy 2011-03-18 13:59:32 +0000 | |||
4 | @@ -1,5 +1,5 @@ | |||
5 | 1 | #!/usr/bin/env python | 1 | #!/usr/bin/env python |
7 | 2 | # pylint: disable-msg=C0103 | 2 | # pylint: disable=C0103 |
8 | 3 | # vim: tabstop=4 shiftwidth=4 softtabstop=4 | 3 | # vim: tabstop=4 shiftwidth=4 softtabstop=4 |
9 | 4 | 4 | ||
10 | 5 | # Copyright 2010 United States Government as represented by the | 5 | # Copyright 2010 United States Government as represented by the |
11 | 6 | 6 | ||
12 | === modified file 'bin/nova-api' | |||
13 | --- bin/nova-api 2011-03-10 06:23:13 +0000 | |||
14 | +++ bin/nova-api 2011-03-18 13:59:32 +0000 | |||
15 | @@ -1,5 +1,5 @@ | |||
16 | 1 | #!/usr/bin/env python | 1 | #!/usr/bin/env python |
18 | 2 | # pylint: disable-msg=C0103 | 2 | # pylint: disable=C0103 |
19 | 3 | # vim: tabstop=4 shiftwidth=4 softtabstop=4 | 3 | # vim: tabstop=4 shiftwidth=4 softtabstop=4 |
20 | 4 | 4 | ||
21 | 5 | # Copyright 2010 United States Government as represented by the | 5 | # Copyright 2010 United States Government as represented by the |
22 | 6 | 6 | ||
23 | === modified file 'bin/nova-direct-api' | |||
24 | --- bin/nova-direct-api 2011-02-23 23:26:52 +0000 | |||
25 | +++ bin/nova-direct-api 2011-03-18 13:59:32 +0000 | |||
26 | @@ -1,5 +1,5 @@ | |||
27 | 1 | #!/usr/bin/env python | 1 | #!/usr/bin/env python |
29 | 2 | # pylint: disable-msg=C0103 | 2 | # pylint: disable=C0103 |
30 | 3 | # vim: tabstop=4 shiftwidth=4 softtabstop=4 | 3 | # vim: tabstop=4 shiftwidth=4 softtabstop=4 |
31 | 4 | 4 | ||
32 | 5 | # Copyright 2010 United States Government as represented by the | 5 | # Copyright 2010 United States Government as represented by the |
33 | 6 | 6 | ||
34 | === modified file 'bin/nova-instancemonitor' | |||
35 | --- bin/nova-instancemonitor 2011-02-21 21:46:41 +0000 | |||
36 | +++ bin/nova-instancemonitor 2011-03-18 13:59:32 +0000 | |||
37 | @@ -50,7 +50,7 @@ | |||
38 | 50 | 50 | ||
39 | 51 | if __name__ == '__builtin__': | 51 | if __name__ == '__builtin__': |
40 | 52 | LOG.warn(_('Starting instance monitor')) | 52 | LOG.warn(_('Starting instance monitor')) |
42 | 53 | # pylint: disable-msg=C0103 | 53 | # pylint: disable=C0103 |
43 | 54 | monitor = monitor.InstanceMonitor() | 54 | monitor = monitor.InstanceMonitor() |
44 | 55 | 55 | ||
45 | 56 | # This is the parent service that twistd will be looking for when it | 56 | # This is the parent service that twistd will be looking for when it |
46 | 57 | 57 | ||
47 | === modified file 'bin/nova-objectstore' | |||
48 | --- bin/nova-objectstore 2010-12-14 23:22:03 +0000 | |||
49 | +++ bin/nova-objectstore 2011-03-18 13:59:32 +0000 | |||
50 | @@ -49,4 +49,4 @@ | |||
51 | 49 | twistd.serve(__file__) | 49 | twistd.serve(__file__) |
52 | 50 | 50 | ||
53 | 51 | if __name__ == '__builtin__': | 51 | if __name__ == '__builtin__': |
55 | 52 | application = handler.get_application() # pylint: disable-msg=C0103 | 52 | application = handler.get_application() # pylint: disable=C0103 |
56 | 53 | 53 | ||
57 | === modified file 'nova/auth/fakeldap.py' | |||
58 | --- nova/auth/fakeldap.py 2010-12-22 23:47:31 +0000 | |||
59 | +++ nova/auth/fakeldap.py 2011-03-18 13:59:32 +0000 | |||
60 | @@ -90,12 +90,12 @@ | |||
61 | 90 | MOD_REPLACE = 2 | 90 | MOD_REPLACE = 2 |
62 | 91 | 91 | ||
63 | 92 | 92 | ||
65 | 93 | class NO_SUCH_OBJECT(Exception): # pylint: disable-msg=C0103 | 93 | class NO_SUCH_OBJECT(Exception): # pylint: disable=C0103 |
66 | 94 | """Duplicate exception class from real LDAP module.""" | 94 | """Duplicate exception class from real LDAP module.""" |
67 | 95 | pass | 95 | pass |
68 | 96 | 96 | ||
69 | 97 | 97 | ||
71 | 98 | class OBJECT_CLASS_VIOLATION(Exception): # pylint: disable-msg=C0103 | 98 | class OBJECT_CLASS_VIOLATION(Exception): # pylint: disable=C0103 |
72 | 99 | """Duplicate exception class from real LDAP module.""" | 99 | """Duplicate exception class from real LDAP module.""" |
73 | 100 | pass | 100 | pass |
74 | 101 | 101 | ||
75 | @@ -268,7 +268,7 @@ | |||
76 | 268 | # get the attributes from the store | 268 | # get the attributes from the store |
77 | 269 | attrs = store.hgetall(key) | 269 | attrs = store.hgetall(key) |
78 | 270 | # turn the values from the store into lists | 270 | # turn the values from the store into lists |
80 | 271 | # pylint: disable-msg=E1103 | 271 | # pylint: disable=E1103 |
81 | 272 | attrs = dict([(k, _from_json(v)) | 272 | attrs = dict([(k, _from_json(v)) |
82 | 273 | for k, v in attrs.iteritems()]) | 273 | for k, v in attrs.iteritems()]) |
83 | 274 | # filter the objects by query | 274 | # filter the objects by query |
84 | @@ -277,12 +277,12 @@ | |||
85 | 277 | attrs = dict([(k, v) for k, v in attrs.iteritems() | 277 | attrs = dict([(k, v) for k, v in attrs.iteritems() |
86 | 278 | if not fields or k in fields]) | 278 | if not fields or k in fields]) |
87 | 279 | objects.append((key[len(self.__prefix):], attrs)) | 279 | objects.append((key[len(self.__prefix):], attrs)) |
89 | 280 | # pylint: enable-msg=E1103 | 280 | # pylint: enable=E1103 |
90 | 281 | if objects == []: | 281 | if objects == []: |
91 | 282 | raise NO_SUCH_OBJECT() | 282 | raise NO_SUCH_OBJECT() |
92 | 283 | return objects | 283 | return objects |
93 | 284 | 284 | ||
94 | 285 | @property | 285 | @property |
96 | 286 | def __prefix(self): # pylint: disable-msg=R0201 | 286 | def __prefix(self): # pylint: disable=R0201 |
97 | 287 | """Get the prefix to use for all keys.""" | 287 | """Get the prefix to use for all keys.""" |
98 | 288 | return 'ldap:' | 288 | return 'ldap:' |
99 | 289 | 289 | ||
100 | === modified file 'nova/auth/ldapdriver.py' | |||
101 | --- nova/auth/ldapdriver.py 2011-03-17 23:32:25 +0000 | |||
102 | +++ nova/auth/ldapdriver.py 2011-03-18 13:59:32 +0000 | |||
103 | @@ -634,6 +634,6 @@ | |||
104 | 634 | class FakeLdapDriver(LdapDriver): | 634 | class FakeLdapDriver(LdapDriver): |
105 | 635 | """Fake Ldap Auth driver""" | 635 | """Fake Ldap Auth driver""" |
106 | 636 | 636 | ||
108 | 637 | def __init__(self): # pylint: disable-msg=W0231 | 637 | def __init__(self): # pylint: disable=W0231 |
109 | 638 | __import__('nova.auth.fakeldap') | 638 | __import__('nova.auth.fakeldap') |
110 | 639 | self.ldap = sys.modules['nova.auth.fakeldap'] | 639 | self.ldap = sys.modules['nova.auth.fakeldap'] |
111 | 640 | 640 | ||
112 | === modified file 'nova/auth/manager.py' | |||
113 | --- nova/auth/manager.py 2011-01-19 02:00:28 +0000 | |||
114 | +++ nova/auth/manager.py 2011-03-18 13:59:32 +0000 | |||
115 | @@ -22,7 +22,7 @@ | |||
116 | 22 | 22 | ||
117 | 23 | import os | 23 | import os |
118 | 24 | import shutil | 24 | import shutil |
120 | 25 | import string # pylint: disable-msg=W0402 | 25 | import string # pylint: disable=W0402 |
121 | 26 | import tempfile | 26 | import tempfile |
122 | 27 | import uuid | 27 | import uuid |
123 | 28 | import zipfile | 28 | import zipfile |
124 | 29 | 29 | ||
125 | === modified file 'nova/compute/manager.py' | |||
126 | --- nova/compute/manager.py 2011-03-15 21:56:00 +0000 | |||
127 | +++ nova/compute/manager.py 2011-03-18 13:59:32 +0000 | |||
128 | @@ -220,7 +220,7 @@ | |||
129 | 220 | self.db.instance_update(context, | 220 | self.db.instance_update(context, |
130 | 221 | instance_id, | 221 | instance_id, |
131 | 222 | {'launched_at': now}) | 222 | {'launched_at': now}) |
133 | 223 | except Exception: # pylint: disable-msg=W0702 | 223 | except Exception: # pylint: disable=W0702 |
134 | 224 | LOG.exception(_("instance %s: Failed to spawn"), instance_id, | 224 | LOG.exception(_("instance %s: Failed to spawn"), instance_id, |
135 | 225 | context=context) | 225 | context=context) |
136 | 226 | self.db.instance_set_state(context, | 226 | self.db.instance_set_state(context, |
137 | @@ -692,7 +692,7 @@ | |||
138 | 692 | volume_id, | 692 | volume_id, |
139 | 693 | instance_id, | 693 | instance_id, |
140 | 694 | mountpoint) | 694 | mountpoint) |
142 | 695 | except Exception as exc: # pylint: disable-msg=W0702 | 695 | except Exception as exc: # pylint: disable=W0702 |
143 | 696 | # NOTE(vish): The inline callback eats the exception info so we | 696 | # NOTE(vish): The inline callback eats the exception info so we |
144 | 697 | # log the traceback here and reraise the same | 697 | # log the traceback here and reraise the same |
145 | 698 | # ecxception below. | 698 | # ecxception below. |
146 | 699 | 699 | ||
147 | === modified file 'nova/db/api.py' | |||
148 | --- nova/db/api.py 2011-03-15 07:45:35 +0000 | |||
149 | +++ nova/db/api.py 2011-03-18 13:59:32 +0000 | |||
150 | @@ -608,7 +608,7 @@ | |||
151 | 608 | return IMPL.network_get_all(context) | 608 | return IMPL.network_get_all(context) |
152 | 609 | 609 | ||
153 | 610 | 610 | ||
155 | 611 | # pylint: disable-msg=C0103 | 611 | # pylint: disable=C0103 |
156 | 612 | def network_get_associated_fixed_ips(context, network_id): | 612 | def network_get_associated_fixed_ips(context, network_id): |
157 | 613 | """Get all network's ips that have been associated.""" | 613 | """Get all network's ips that have been associated.""" |
158 | 614 | return IMPL.network_get_associated_fixed_ips(context, network_id) | 614 | return IMPL.network_get_associated_fixed_ips(context, network_id) |
159 | 615 | 615 | ||
160 | === modified file 'nova/db/base.py' | |||
161 | --- nova/db/base.py 2010-12-01 17:24:39 +0000 | |||
162 | +++ nova/db/base.py 2011-03-18 13:59:32 +0000 | |||
163 | @@ -33,4 +33,4 @@ | |||
164 | 33 | def __init__(self, db_driver=None): | 33 | def __init__(self, db_driver=None): |
165 | 34 | if not db_driver: | 34 | if not db_driver: |
166 | 35 | db_driver = FLAGS.db_driver | 35 | db_driver = FLAGS.db_driver |
168 | 36 | self.db = utils.import_object(db_driver) # pylint: disable-msg=C0103 | 36 | self.db = utils.import_object(db_driver) # pylint: disable=C0103 |
169 | 37 | 37 | ||
170 | === modified file 'nova/db/sqlalchemy/api.py' | |||
171 | --- nova/db/sqlalchemy/api.py 2011-03-17 20:27:23 +0000 | |||
172 | +++ nova/db/sqlalchemy/api.py 2011-03-18 13:59:32 +0000 | |||
173 | @@ -1249,7 +1249,7 @@ | |||
174 | 1249 | 1249 | ||
175 | 1250 | # NOTE(vish): pylint complains because of the long method name, but | 1250 | # NOTE(vish): pylint complains because of the long method name, but |
176 | 1251 | # it fits with the names of the rest of the methods | 1251 | # it fits with the names of the rest of the methods |
178 | 1252 | # pylint: disable-msg=C0103 | 1252 | # pylint: disable=C0103 |
179 | 1253 | 1253 | ||
180 | 1254 | 1254 | ||
181 | 1255 | @require_admin_context | 1255 | @require_admin_context |
182 | 1256 | 1256 | ||
183 | === modified file 'nova/network/linux_net.py' | |||
184 | --- nova/network/linux_net.py 2011-03-14 13:21:44 +0000 | |||
185 | +++ nova/network/linux_net.py 2011-03-18 13:59:32 +0000 | |||
186 | @@ -582,7 +582,7 @@ | |||
187 | 582 | try: | 582 | try: |
188 | 583 | _execute('sudo', 'kill', '-HUP', pid) | 583 | _execute('sudo', 'kill', '-HUP', pid) |
189 | 584 | return | 584 | return |
191 | 585 | except Exception as exc: # pylint: disable-msg=W0703 | 585 | except Exception as exc: # pylint: disable=W0703 |
192 | 586 | LOG.debug(_("Hupping dnsmasq threw %s"), exc) | 586 | LOG.debug(_("Hupping dnsmasq threw %s"), exc) |
193 | 587 | else: | 587 | else: |
194 | 588 | LOG.debug(_("Pid %d is stale, relaunching dnsmasq"), pid) | 588 | LOG.debug(_("Pid %d is stale, relaunching dnsmasq"), pid) |
195 | @@ -626,7 +626,7 @@ | |||
196 | 626 | if conffile in out: | 626 | if conffile in out: |
197 | 627 | try: | 627 | try: |
198 | 628 | _execute('sudo', 'kill', pid) | 628 | _execute('sudo', 'kill', pid) |
200 | 629 | except Exception as exc: # pylint: disable-msg=W0703 | 629 | except Exception as exc: # pylint: disable=W0703 |
201 | 630 | LOG.debug(_("killing radvd threw %s"), exc) | 630 | LOG.debug(_("killing radvd threw %s"), exc) |
202 | 631 | else: | 631 | else: |
203 | 632 | LOG.debug(_("Pid %d is stale, relaunching radvd"), pid) | 632 | LOG.debug(_("Pid %d is stale, relaunching radvd"), pid) |
204 | @@ -713,7 +713,7 @@ | |||
205 | 713 | if pid: | 713 | if pid: |
206 | 714 | try: | 714 | try: |
207 | 715 | _execute('sudo', 'kill', '-TERM', pid) | 715 | _execute('sudo', 'kill', '-TERM', pid) |
209 | 716 | except Exception as exc: # pylint: disable-msg=W0703 | 716 | except Exception as exc: # pylint: disable=W0703 |
210 | 717 | LOG.debug(_("Killing dnsmasq threw %s"), exc) | 717 | LOG.debug(_("Killing dnsmasq threw %s"), exc) |
211 | 718 | 718 | ||
212 | 719 | 719 | ||
213 | 720 | 720 | ||
214 | === modified file 'nova/network/manager.py' | |||
215 | --- nova/network/manager.py 2011-03-09 18:16:26 +0000 | |||
216 | +++ nova/network/manager.py 2011-03-18 13:59:32 +0000 | |||
217 | @@ -322,12 +322,12 @@ | |||
218 | 322 | self._create_fixed_ips(context, network_ref['id']) | 322 | self._create_fixed_ips(context, network_ref['id']) |
219 | 323 | 323 | ||
220 | 324 | @property | 324 | @property |
222 | 325 | def _bottom_reserved_ips(self): # pylint: disable-msg=R0201 | 325 | def _bottom_reserved_ips(self): # pylint: disable=R0201 |
223 | 326 | """Number of reserved ips at the bottom of the range.""" | 326 | """Number of reserved ips at the bottom of the range.""" |
224 | 327 | return 2 # network, gateway | 327 | return 2 # network, gateway |
225 | 328 | 328 | ||
226 | 329 | @property | 329 | @property |
228 | 330 | def _top_reserved_ips(self): # pylint: disable-msg=R0201 | 330 | def _top_reserved_ips(self): # pylint: disable=R0201 |
229 | 331 | """Number of reserved ips at the top of the range.""" | 331 | """Number of reserved ips at the top of the range.""" |
230 | 332 | return 1 # broadcast | 332 | return 1 # broadcast |
231 | 333 | 333 | ||
232 | 334 | 334 | ||
233 | === modified file 'nova/objectstore/handler.py' | |||
234 | --- nova/objectstore/handler.py 2011-01-21 21:10:26 +0000 | |||
235 | +++ nova/objectstore/handler.py 2011-03-18 13:59:32 +0000 | |||
236 | @@ -167,7 +167,7 @@ | |||
237 | 167 | def __init__(self): | 167 | def __init__(self): |
238 | 168 | ErrorHandlingResource.__init__(self) | 168 | ErrorHandlingResource.__init__(self) |
239 | 169 | 169 | ||
241 | 170 | def getChild(self, name, request): # pylint: disable-msg=C0103 | 170 | def getChild(self, name, request): # pylint: disable=C0103 |
242 | 171 | """Returns either the image or bucket resource""" | 171 | """Returns either the image or bucket resource""" |
243 | 172 | request.context = get_context(request) | 172 | request.context = get_context(request) |
244 | 173 | if name == '': | 173 | if name == '': |
245 | @@ -177,7 +177,7 @@ | |||
246 | 177 | else: | 177 | else: |
247 | 178 | return BucketResource(name) | 178 | return BucketResource(name) |
248 | 179 | 179 | ||
250 | 180 | def render_GET(self, request): # pylint: disable-msg=R0201 | 180 | def render_GET(self, request): # pylint: disable=R0201 |
251 | 181 | """Renders the GET request for a list of buckets as XML""" | 181 | """Renders the GET request for a list of buckets as XML""" |
252 | 182 | LOG.debug(_('List of buckets requested'), context=request.context) | 182 | LOG.debug(_('List of buckets requested'), context=request.context) |
253 | 183 | buckets = [b for b in bucket.Bucket.all() | 183 | buckets = [b for b in bucket.Bucket.all() |
254 | @@ -355,7 +355,7 @@ | |||
255 | 355 | else: | 355 | else: |
256 | 356 | return ImageResource(name) | 356 | return ImageResource(name) |
257 | 357 | 357 | ||
259 | 358 | def render_GET(self, request): # pylint: disable-msg=R0201 | 358 | def render_GET(self, request): # pylint: disable=R0201 |
260 | 359 | """ returns a json listing of all images | 359 | """ returns a json listing of all images |
261 | 360 | that a user has permissions to see """ | 360 | that a user has permissions to see """ |
262 | 361 | 361 | ||
263 | @@ -384,7 +384,7 @@ | |||
264 | 384 | request.finish() | 384 | request.finish() |
265 | 385 | return server.NOT_DONE_YET | 385 | return server.NOT_DONE_YET |
266 | 386 | 386 | ||
268 | 387 | def render_PUT(self, request): # pylint: disable-msg=R0201 | 387 | def render_PUT(self, request): # pylint: disable=R0201 |
269 | 388 | """ create a new registered image """ | 388 | """ create a new registered image """ |
270 | 389 | 389 | ||
271 | 390 | image_id = get_argument(request, 'image_id', u'') | 390 | image_id = get_argument(request, 'image_id', u'') |
272 | @@ -413,7 +413,7 @@ | |||
273 | 413 | p.start() | 413 | p.start() |
274 | 414 | return '' | 414 | return '' |
275 | 415 | 415 | ||
277 | 416 | def render_POST(self, request): # pylint: disable-msg=R0201 | 416 | def render_POST(self, request): # pylint: disable=R0201 |
278 | 417 | """Update image attributes: public/private""" | 417 | """Update image attributes: public/private""" |
279 | 418 | 418 | ||
280 | 419 | # image_id required for all requests | 419 | # image_id required for all requests |
281 | @@ -441,7 +441,7 @@ | |||
282 | 441 | image_object.update_user_editable_fields(clean_args) | 441 | image_object.update_user_editable_fields(clean_args) |
283 | 442 | return '' | 442 | return '' |
284 | 443 | 443 | ||
286 | 444 | def render_DELETE(self, request): # pylint: disable-msg=R0201 | 444 | def render_DELETE(self, request): # pylint: disable=R0201 |
287 | 445 | """Delete a registered image""" | 445 | """Delete a registered image""" |
288 | 446 | image_id = get_argument(request, "image_id", u"") | 446 | image_id = get_argument(request, "image_id", u"") |
289 | 447 | image_object = image.Image(image_id) | 447 | image_object = image.Image(image_id) |
290 | @@ -471,7 +471,7 @@ | |||
291 | 471 | application = service.Application("objectstore") | 471 | application = service.Application("objectstore") |
292 | 472 | # Disabled because of lack of proper introspection in Twisted | 472 | # Disabled because of lack of proper introspection in Twisted |
293 | 473 | # or possibly different versions of twisted? | 473 | # or possibly different versions of twisted? |
295 | 474 | # pylint: disable-msg=E1101 | 474 | # pylint: disable=E1101 |
296 | 475 | objectStoreService = internet.TCPServer(FLAGS.s3_port, factory, | 475 | objectStoreService = internet.TCPServer(FLAGS.s3_port, factory, |
297 | 476 | interface=FLAGS.s3_listen_host) | 476 | interface=FLAGS.s3_listen_host) |
298 | 477 | objectStoreService.setServiceParent(application) | 477 | objectStoreService.setServiceParent(application) |
299 | 478 | 478 | ||
300 | === modified file 'nova/rpc.py' | |||
301 | --- nova/rpc.py 2011-03-17 23:41:16 +0000 | |||
302 | +++ nova/rpc.py 2011-03-18 13:59:32 +0000 | |||
303 | @@ -62,7 +62,7 @@ | |||
304 | 62 | params['backend_cls'] = fakerabbit.Backend | 62 | params['backend_cls'] = fakerabbit.Backend |
305 | 63 | 63 | ||
306 | 64 | # NOTE(vish): magic is fun! | 64 | # NOTE(vish): magic is fun! |
308 | 65 | # pylint: disable-msg=W0142 | 65 | # pylint: disable=W0142 |
309 | 66 | if new: | 66 | if new: |
310 | 67 | return cls(**params) | 67 | return cls(**params) |
311 | 68 | else: | 68 | else: |
312 | @@ -114,7 +114,7 @@ | |||
313 | 114 | if self.failed_connection: | 114 | if self.failed_connection: |
314 | 115 | # NOTE(vish): connection is defined in the parent class, we can | 115 | # NOTE(vish): connection is defined in the parent class, we can |
315 | 116 | # recreate it as long as we create the backend too | 116 | # recreate it as long as we create the backend too |
317 | 117 | # pylint: disable-msg=W0201 | 117 | # pylint: disable=W0201 |
318 | 118 | self.connection = Connection.recreate() | 118 | self.connection = Connection.recreate() |
319 | 119 | self.backend = self.connection.create_backend() | 119 | self.backend = self.connection.create_backend() |
320 | 120 | self.declare() | 120 | self.declare() |
321 | @@ -125,7 +125,7 @@ | |||
322 | 125 | # NOTE(vish): This is catching all errors because we really don't | 125 | # NOTE(vish): This is catching all errors because we really don't |
323 | 126 | # want exceptions to be logged 10 times a second if some | 126 | # want exceptions to be logged 10 times a second if some |
324 | 127 | # persistent failure occurs. | 127 | # persistent failure occurs. |
326 | 128 | except Exception: # pylint: disable-msg=W0703 | 128 | except Exception: # pylint: disable=W0703 |
327 | 129 | if not self.failed_connection: | 129 | if not self.failed_connection: |
328 | 130 | LOG.exception(_("Failed to fetch message from queue")) | 130 | LOG.exception(_("Failed to fetch message from queue")) |
329 | 131 | self.failed_connection = True | 131 | self.failed_connection = True |
330 | 132 | 132 | ||
331 | === modified file 'nova/service.py' | |||
332 | --- nova/service.py 2011-03-10 06:23:13 +0000 | |||
333 | +++ nova/service.py 2011-03-18 13:59:32 +0000 | |||
334 | @@ -217,7 +217,7 @@ | |||
335 | 217 | logging.error(_("Recovered model server connection!")) | 217 | logging.error(_("Recovered model server connection!")) |
336 | 218 | 218 | ||
337 | 219 | # TODO(vish): this should probably only catch connection errors | 219 | # TODO(vish): this should probably only catch connection errors |
339 | 220 | except Exception: # pylint: disable-msg=W0702 | 220 | except Exception: # pylint: disable=W0702 |
340 | 221 | if not getattr(self, "model_disconnected", False): | 221 | if not getattr(self, "model_disconnected", False): |
341 | 222 | self.model_disconnected = True | 222 | self.model_disconnected = True |
342 | 223 | logging.exception(_("model server went away")) | 223 | logging.exception(_("model server went away")) |
343 | 224 | 224 | ||
344 | === modified file 'nova/tests/api/test_wsgi.py' | |||
345 | --- nova/tests/api/test_wsgi.py 2011-03-09 20:08:11 +0000 | |||
346 | +++ nova/tests/api/test_wsgi.py 2011-03-18 13:59:32 +0000 | |||
347 | @@ -80,7 +80,7 @@ | |||
348 | 80 | "attributes": { | 80 | "attributes": { |
349 | 81 | "test": ["id"]}}} | 81 | "test": ["id"]}}} |
350 | 82 | 82 | ||
352 | 83 | def show(self, req, id): # pylint: disable-msg=W0622,C0103 | 83 | def show(self, req, id): # pylint: disable=W0622,C0103 |
353 | 84 | return {"test": {"id": id}} | 84 | return {"test": {"id": id}} |
354 | 85 | 85 | ||
355 | 86 | def __init__(self): | 86 | def __init__(self): |
356 | 87 | 87 | ||
357 | === modified file 'nova/tests/hyperv_unittest.py' | |||
358 | --- nova/tests/hyperv_unittest.py 2011-01-05 23:02:09 +0000 | |||
359 | +++ nova/tests/hyperv_unittest.py 2011-03-18 13:59:32 +0000 | |||
360 | @@ -51,7 +51,7 @@ | |||
361 | 51 | instance_ref = db.instance_create(self.context, instance) | 51 | instance_ref = db.instance_create(self.context, instance) |
362 | 52 | 52 | ||
363 | 53 | conn = hyperv.get_connection(False) | 53 | conn = hyperv.get_connection(False) |
365 | 54 | conn._create_vm(instance_ref) # pylint: disable-msg=W0212 | 54 | conn._create_vm(instance_ref) # pylint: disable=W0212 |
366 | 55 | found = [n for n in conn.list_instances() | 55 | found = [n for n in conn.list_instances() |
367 | 56 | if n == instance_ref['name']] | 56 | if n == instance_ref['name']] |
368 | 57 | self.assertTrue(len(found) == 1) | 57 | self.assertTrue(len(found) == 1) |
369 | 58 | 58 | ||
370 | === modified file 'nova/tests/objectstore_unittest.py' | |||
371 | --- nova/tests/objectstore_unittest.py 2011-02-23 19:56:37 +0000 | |||
372 | +++ nova/tests/objectstore_unittest.py 2011-03-18 13:59:32 +0000 | |||
373 | @@ -179,7 +179,7 @@ | |||
374 | 179 | class TestHTTPChannel(http.HTTPChannel): | 179 | class TestHTTPChannel(http.HTTPChannel): |
375 | 180 | """Dummy site required for twisted.web""" | 180 | """Dummy site required for twisted.web""" |
376 | 181 | 181 | ||
378 | 182 | def checkPersistence(self, _, __): # pylint: disable-msg=C0103 | 182 | def checkPersistence(self, _, __): # pylint: disable=C0103 |
379 | 183 | """Otherwise we end up with an unclean reactor.""" | 183 | """Otherwise we end up with an unclean reactor.""" |
380 | 184 | return False | 184 | return False |
381 | 185 | 185 | ||
382 | @@ -209,10 +209,10 @@ | |||
383 | 209 | 209 | ||
384 | 210 | root = S3() | 210 | root = S3() |
385 | 211 | self.site = TestSite(root) | 211 | self.site = TestSite(root) |
387 | 212 | # pylint: disable-msg=E1101 | 212 | # pylint: disable=E1101 |
388 | 213 | self.listening_port = reactor.listenTCP(0, self.site, | 213 | self.listening_port = reactor.listenTCP(0, self.site, |
389 | 214 | interface='127.0.0.1') | 214 | interface='127.0.0.1') |
391 | 215 | # pylint: enable-msg=E1101 | 215 | # pylint: enable=E1101 |
392 | 216 | self.tcp_port = self.listening_port.getHost().port | 216 | self.tcp_port = self.listening_port.getHost().port |
393 | 217 | 217 | ||
394 | 218 | if not boto.config.has_section('Boto'): | 218 | if not boto.config.has_section('Boto'): |
395 | @@ -231,11 +231,11 @@ | |||
396 | 231 | 231 | ||
397 | 232 | self.conn.get_http_connection = get_http_connection | 232 | self.conn.get_http_connection = get_http_connection |
398 | 233 | 233 | ||
400 | 234 | def _ensure_no_buckets(self, buckets): # pylint: disable-msg=C0111 | 234 | def _ensure_no_buckets(self, buckets): # pylint: disable=C0111 |
401 | 235 | self.assertEquals(len(buckets), 0, "Bucket list was not empty") | 235 | self.assertEquals(len(buckets), 0, "Bucket list was not empty") |
402 | 236 | return True | 236 | return True |
403 | 237 | 237 | ||
405 | 238 | def _ensure_one_bucket(self, buckets, name): # pylint: disable-msg=C0111 | 238 | def _ensure_one_bucket(self, buckets, name): # pylint: disable=C0111 |
406 | 239 | self.assertEquals(len(buckets), 1, | 239 | self.assertEquals(len(buckets), 1, |
407 | 240 | "Bucket list didn't have exactly one element in it") | 240 | "Bucket list didn't have exactly one element in it") |
408 | 241 | self.assertEquals(buckets[0].name, name, "Wrong name") | 241 | self.assertEquals(buckets[0].name, name, "Wrong name") |
409 | 242 | 242 | ||
410 | === modified file 'nova/tests/test_api.py' | |||
411 | --- nova/tests/test_api.py 2011-02-21 20:41:15 +0000 | |||
412 | +++ nova/tests/test_api.py 2011-03-18 13:59:32 +0000 | |||
413 | @@ -124,7 +124,7 @@ | |||
414 | 124 | self.mox.StubOutWithMock(self.ec2, 'new_http_connection') | 124 | self.mox.StubOutWithMock(self.ec2, 'new_http_connection') |
415 | 125 | self.http = FakeHttplibConnection( | 125 | self.http = FakeHttplibConnection( |
416 | 126 | self.app, '%s:8773' % (self.host), False) | 126 | self.app, '%s:8773' % (self.host), False) |
418 | 127 | # pylint: disable-msg=E1103 | 127 | # pylint: disable=E1103 |
419 | 128 | self.ec2.new_http_connection(host, is_secure).AndReturn(self.http) | 128 | self.ec2.new_http_connection(host, is_secure).AndReturn(self.http) |
420 | 129 | return self.http | 129 | return self.http |
421 | 130 | 130 | ||
422 | 131 | 131 | ||
423 | === modified file 'nova/tests/test_middleware.py' | |||
424 | --- nova/tests/test_middleware.py 2011-01-15 01:48:48 +0000 | |||
425 | +++ nova/tests/test_middleware.py 2011-03-18 13:59:32 +0000 | |||
426 | @@ -40,12 +40,12 @@ | |||
427 | 40 | 40 | ||
428 | 41 | class LockoutTestCase(test.TestCase): | 41 | class LockoutTestCase(test.TestCase): |
429 | 42 | """Test case for the Lockout middleware.""" | 42 | """Test case for the Lockout middleware.""" |
431 | 43 | def setUp(self): # pylint: disable-msg=C0103 | 43 | def setUp(self): # pylint: disable=C0103 |
432 | 44 | super(LockoutTestCase, self).setUp() | 44 | super(LockoutTestCase, self).setUp() |
433 | 45 | utils.set_time_override() | 45 | utils.set_time_override() |
434 | 46 | self.lockout = ec2.Lockout(conditional_forbid) | 46 | self.lockout = ec2.Lockout(conditional_forbid) |
435 | 47 | 47 | ||
437 | 48 | def tearDown(self): # pylint: disable-msg=C0103 | 48 | def tearDown(self): # pylint: disable=C0103 |
438 | 49 | utils.clear_time_override() | 49 | utils.clear_time_override() |
439 | 50 | super(LockoutTestCase, self).tearDown() | 50 | super(LockoutTestCase, self).tearDown() |
440 | 51 | 51 | ||
441 | 52 | 52 | ||
442 | === modified file 'po/nova.pot' | |||
443 | --- po/nova.pot 2011-02-22 04:36:17 +0000 | |||
444 | +++ po/nova.pot 2011-03-18 13:59:32 +0000 | |||
445 | @@ -300,7 +300,7 @@ | |||
446 | 300 | msgid "instance %s: starting..." | 300 | msgid "instance %s: starting..." |
447 | 301 | msgstr "" | 301 | msgstr "" |
448 | 302 | 302 | ||
450 | 303 | #. pylint: disable-msg=W0702 | 303 | #. pylint: disable=W0702 |
451 | 304 | #: ../nova/compute/manager.py:219 | 304 | #: ../nova/compute/manager.py:219 |
452 | 305 | #, python-format | 305 | #, python-format |
453 | 306 | msgid "instance %s: Failed to spawn" | 306 | msgid "instance %s: Failed to spawn" |
454 | @@ -440,7 +440,7 @@ | |||
455 | 440 | "instance %(instance_id)s: attaching volume %(volume_id)s to %(mountpoint)s" | 440 | "instance %(instance_id)s: attaching volume %(volume_id)s to %(mountpoint)s" |
456 | 441 | msgstr "" | 441 | msgstr "" |
457 | 442 | 442 | ||
459 | 443 | #. pylint: disable-msg=W0702 | 443 | #. pylint: disable=W0702 |
460 | 444 | #. NOTE(vish): The inline callback eats the exception info so we | 444 | #. NOTE(vish): The inline callback eats the exception info so we |
461 | 445 | #. log the traceback here and reraise the same | 445 | #. log the traceback here and reraise the same |
462 | 446 | #. ecxception below. | 446 | #. ecxception below. |
463 | @@ -591,7 +591,7 @@ | |||
464 | 591 | msgid "Starting Bridge interface for %s" | 591 | msgid "Starting Bridge interface for %s" |
465 | 592 | msgstr "" | 592 | msgstr "" |
466 | 593 | 593 | ||
468 | 594 | #. pylint: disable-msg=W0703 | 594 | #. pylint: disable=W0703 |
469 | 595 | #: ../nova/network/linux_net.py:314 | 595 | #: ../nova/network/linux_net.py:314 |
470 | 596 | #, python-format | 596 | #, python-format |
471 | 597 | msgid "Hupping dnsmasq threw %s" | 597 | msgid "Hupping dnsmasq threw %s" |
472 | @@ -602,7 +602,7 @@ | |||
473 | 602 | msgid "Pid %d is stale, relaunching dnsmasq" | 602 | msgid "Pid %d is stale, relaunching dnsmasq" |
474 | 603 | msgstr "" | 603 | msgstr "" |
475 | 604 | 604 | ||
477 | 605 | #. pylint: disable-msg=W0703 | 605 | #. pylint: disable=W0703 |
478 | 606 | #: ../nova/network/linux_net.py:358 | 606 | #: ../nova/network/linux_net.py:358 |
479 | 607 | #, python-format | 607 | #, python-format |
480 | 608 | msgid "killing radvd threw %s" | 608 | msgid "killing radvd threw %s" |
481 | @@ -613,7 +613,7 @@ | |||
482 | 613 | msgid "Pid %d is stale, relaunching radvd" | 613 | msgid "Pid %d is stale, relaunching radvd" |
483 | 614 | msgstr "" | 614 | msgstr "" |
484 | 615 | 615 | ||
486 | 616 | #. pylint: disable-msg=W0703 | 616 | #. pylint: disable=W0703 |
487 | 617 | #: ../nova/network/linux_net.py:449 | 617 | #: ../nova/network/linux_net.py:449 |
488 | 618 | #, python-format | 618 | #, python-format |
489 | 619 | msgid "Killing dnsmasq threw %s" | 619 | msgid "Killing dnsmasq threw %s" |
490 | 620 | 620 | ||
491 | === modified file 'tools/euca-get-ajax-console' | |||
492 | --- tools/euca-get-ajax-console 2011-02-26 18:09:57 +0000 | |||
493 | +++ tools/euca-get-ajax-console 2011-03-18 13:59:32 +0000 | |||
494 | @@ -1,5 +1,5 @@ | |||
495 | 1 | #!/usr/bin/env python | 1 | #!/usr/bin/env python |
497 | 2 | # pylint: disable-msg=C0103 | 2 | # pylint: disable=C0103 |
498 | 3 | # vim: tabstop=4 shiftwidth=4 softtabstop=4 | 3 | # vim: tabstop=4 shiftwidth=4 softtabstop=4 |
499 | 4 | 4 | ||
500 | 5 | # Copyright 2010 United States Government as represented by the | 5 | # Copyright 2010 United States Government as represented by the |
Removed my old proposal which had a bunch of different pylint fixes in favor of a couple smaller ones as per community suggestion.