Merge lp:~justin-fathomdb/nova/fix-pylint-servers into lp:~hudson-openstack/nova/trunk

Proposed by justinsb
Status: Merged
Approved by: Josh Kearney
Approved revision: 818
Merged at revision: 872
Proposed branch: lp:~justin-fathomdb/nova/fix-pylint-servers
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 64 lines (+8/-9)
1 file modified
nova/api/openstack/servers.py (+8/-9)
To merge this branch: bzr merge lp:~justin-fathomdb/nova/fix-pylint-servers
Reviewer Review Type Date Requested Status
Josh Kearney (community) Approve
Matt Dietz (community) Approve
Review via email: mp+53716@code.launchpad.net

Description of the change

Fix some errors that pylint found in nova/api/openstack/servers.py

This was meant more as a test that pylint is actually being helpful now (it is), but these are real errors.

To post a comment you must log in.
Revision history for this message
Matt Dietz (cerberus) wrote :

lgtm.

review: Approve
Revision history for this message
Josh Kearney (jk0) wrote :

lgtm

review: Approve
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Attempt to merge into lp:nova failed due to conflicts:

text conflict in nova/api/openstack/servers.py

Revision history for this message
justinsb (justin-fathomdb) wrote :

Merged with trunk. Interm changes have made that file a bit of a pylint disaster zone again :-(

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nova/api/openstack/servers.py'
2--- nova/api/openstack/servers.py 2011-03-24 05:08:17 +0000
3+++ nova/api/openstack/servers.py 2011-03-24 17:57:21 +0000
4@@ -15,19 +15,19 @@
5
6 import base64
7 import hashlib
8-import json
9 import traceback
10+
11+from webob import exc
12 from xml.dom import minidom
13
14-from webob import exc
15-
16 from nova import compute
17 from nova import context
18 from nova import exception
19 from nova import flags
20 from nova import log as logging
21+from nova import quota
22+from nova import utils
23 from nova import wsgi
24-from nova import utils
25 from nova.api.openstack import common
26 from nova.api.openstack import faults
27 import nova.api.openstack.views.addresses
28@@ -36,7 +36,6 @@
29 from nova.auth import manager as auth_manager
30 from nova.compute import instance_types
31 from nova.compute import power_state
32-from nova.quota import QuotaError
33 import nova.api.openstack
34
35
36@@ -156,8 +155,8 @@
37 key_data=key_data,
38 metadata=metadata,
39 injected_files=injected_files)
40- except QuotaError as error:
41- self._handle_quota_errors(error)
42+ except quota.QuotaError as error:
43+ self._handle_quota_error(error)
44
45 inst['instance_type'] = flavor_id
46 inst['image_id'] = requested_image_id
47@@ -211,7 +210,7 @@
48 injected_files.append((path, contents))
49 return injected_files
50
51- def _handle_quota_errors(self, error):
52+ def _handle_quota_error(self, error):
53 """
54 Reraise quota errors as api-specific http exceptions
55 """
56@@ -242,7 +241,7 @@
57 update_dict['admin_pass'] = inst_dict['server']['adminPass']
58 try:
59 self.compute_api.set_admin_password(ctxt, id)
60- except exception.TimeoutException, e:
61+ except exception.TimeoutException:
62 return exc.HTTPRequestTimeout()
63 if 'name' in inst_dict['server']:
64 update_dict['display_name'] = inst_dict['server']['name']