Merge lp:~jk0/nova/improve-pylint-scores into lp:~hudson-openstack/nova/trunk

Proposed by Josh Kearney
Status: Merged
Approved by: Josh Kearney
Approved revision: 1007
Merged at revision: 1009
Proposed branch: lp:~jk0/nova/improve-pylint-scores
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 68 lines (+9/-10)
2 files modified
bin/nova-compute (+3/-3)
bin/nova-manage (+6/-7)
To merge this branch: bzr merge lp:~jk0/nova/improve-pylint-scores
Reviewer Review Type Date Requested Status
Matt Dietz (community) Approve
Devin Carlen (community) Approve
Review via email: mp+58570@code.launchpad.net

Description of the change

Another small round of pylint clean-up.

To post a comment you must log in.
Revision history for this message
Devin Carlen (devcamcar) wrote :

lgtm

review: Approve
Revision history for this message
Matt Dietz (cerberus) wrote :

\o/

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/nova-compute'
--- bin/nova-compute 2011-02-21 21:59:46 +0000
+++ bin/nova-compute 2011-04-20 20:27:14 +0000
@@ -28,11 +28,11 @@
2828
29# If ../nova/__init__.py exists, add ../ to Python search path, so that29# If ../nova/__init__.py exists, add ../ to Python search path, so that
30# it will override what happens to be installed in /usr/(local/)lib/python...30# it will override what happens to be installed in /usr/(local/)lib/python...
31possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),31POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
32 os.pardir,32 os.pardir,
33 os.pardir))33 os.pardir))
34if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):34if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'nova', '__init__.py')):
35 sys.path.insert(0, possible_topdir)35 sys.path.insert(0, POSSIBLE_TOPDIR)
3636
37gettext.install('nova', unicode=1)37gettext.install('nova', unicode=1)
3838
3939
=== modified file 'bin/nova-manage'
--- bin/nova-manage 2011-04-18 21:21:51 +0000
+++ bin/nova-manage 2011-04-20 20:27:14 +0000
@@ -58,7 +58,6 @@
58import glob58import glob
59import json59import json
60import os60import os
61import re
62import sys61import sys
63import time62import time
6463
@@ -66,11 +65,11 @@
6665
67# If ../nova/__init__.py exists, add ../ to Python search path, so that66# If ../nova/__init__.py exists, add ../ to Python search path, so that
68# it will override what happens to be installed in /usr/(local/)lib/python...67# it will override what happens to be installed in /usr/(local/)lib/python...
69possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),68POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
70 os.pardir,69 os.pardir,
71 os.pardir))70 os.pardir))
72if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):71if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'nova', '__init__.py')):
73 sys.path.insert(0, possible_topdir)72 sys.path.insert(0, POSSIBLE_TOPDIR)
7473
75gettext.install('nova', unicode=1)74gettext.install('nova', unicode=1)
7675
@@ -809,11 +808,11 @@
809class InstanceTypeCommands(object):808class InstanceTypeCommands(object):
810 """Class for managing instance types / flavors."""809 """Class for managing instance types / flavors."""
811810
812 def _print_instance_types(self, n, val):811 def _print_instance_types(self, name, val):
813 deleted = ('', ', inactive')[val["deleted"] == 1]812 deleted = ('', ', inactive')[val["deleted"] == 1]
814 print ("%s: Memory: %sMB, VCPUS: %s, Storage: %sGB, FlavorID: %s, "813 print ("%s: Memory: %sMB, VCPUS: %s, Storage: %sGB, FlavorID: %s, "
815 "Swap: %sGB, RXTX Quota: %sGB, RXTX Cap: %sMB%s") % (814 "Swap: %sGB, RXTX Quota: %sGB, RXTX Cap: %sMB%s") % (
816 n, val["memory_mb"], val["vcpus"], val["local_gb"],815 name, val["memory_mb"], val["vcpus"], val["local_gb"],
817 val["flavorid"], val["swap"], val["rxtx_quota"],816 val["flavorid"], val["swap"], val["rxtx_quota"],
818 val["rxtx_cap"], deleted)817 val["rxtx_cap"], deleted)
819818
@@ -1021,7 +1020,7 @@
1021 machine_images[image_path] = image_metadata1020 machine_images[image_path] = image_metadata
1022 else:1021 else:
1023 other_images[image_path] = image_metadata1022 other_images[image_path] = image_metadata
1024 except Exception as exc:1023 except Exception:
1025 print _("Failed to load %(fn)s.") % locals()1024 print _("Failed to load %(fn)s.") % locals()
1026 # NOTE(vish): do kernels and ramdisks first so images1025 # NOTE(vish): do kernels and ramdisks first so images
1027 self._convert_images(other_images)1026 self._convert_images(other_images)