summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorEldar Nugaev <enugaev@griddynamics.com>2011-04-21 04:20:19 +0400
committerEldar Nugaev <enugaev@griddynamics.com>2011-04-21 04:20:19 +0400
commit5fc608bb60dc9c086d8c2c7ac69c0dd6719c061f (patch)
treeb62c782a52dc4634553dbfc39ee473a3268f131d /bin
parentfe23f71687e09248feb7542ea97001a496697742 (diff)
parent7e345f07edc13ad7d56d50b67b089b16d860cb40 (diff)
downloadnova-5fc608bb60dc9c086d8c2c7ac69c0dd6719c061f.tar.gz
nova-5fc608bb60dc9c086d8c2c7ac69c0dd6719c061f.tar.xz
nova-5fc608bb60dc9c086d8c2c7ac69c0dd6719c061f.zip
revert changes that doesn't affect the bug
Diffstat (limited to 'bin')
-rwxr-xr-xbin/nova-compute6
-rwxr-xr-xbin/nova-manage13
2 files changed, 9 insertions, 10 deletions
diff --git a/bin/nova-compute b/bin/nova-compute
index 95fa393b1..cd7c78def 100755
--- a/bin/nova-compute
+++ b/bin/nova-compute
@@ -28,11 +28,11 @@ import sys
# If ../nova/__init__.py exists, add ../ to Python search path, so that
# it will override what happens to be installed in /usr/(local/)lib/python...
-possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
+POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
os.pardir,
os.pardir))
-if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
- sys.path.insert(0, possible_topdir)
+if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'nova', '__init__.py')):
+ sys.path.insert(0, POSSIBLE_TOPDIR)
gettext.install('nova', unicode=1)
diff --git a/bin/nova-manage b/bin/nova-manage
index b2308bc03..2c06767f1 100755
--- a/bin/nova-manage
+++ b/bin/nova-manage
@@ -58,7 +58,6 @@ import gettext
import glob
import json
import os
-import re
import sys
import time
@@ -66,11 +65,11 @@ import IPy
# If ../nova/__init__.py exists, add ../ to Python search path, so that
# it will override what happens to be installed in /usr/(local/)lib/python...
-possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
+POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
os.pardir,
os.pardir))
-if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
- sys.path.insert(0, possible_topdir)
+if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'nova', '__init__.py')):
+ sys.path.insert(0, POSSIBLE_TOPDIR)
gettext.install('nova', unicode=1)
@@ -809,11 +808,11 @@ class VolumeCommands(object):
class InstanceTypeCommands(object):
"""Class for managing instance types / flavors."""
- def _print_instance_types(self, n, val):
+ def _print_instance_types(self, name, val):
deleted = ('', ', inactive')[val["deleted"] == 1]
print ("%s: Memory: %sMB, VCPUS: %s, Storage: %sGB, FlavorID: %s, "
"Swap: %sGB, RXTX Quota: %sGB, RXTX Cap: %sMB%s") % (
- n, val["memory_mb"], val["vcpus"], val["local_gb"],
+ name, val["memory_mb"], val["vcpus"], val["local_gb"],
val["flavorid"], val["swap"], val["rxtx_quota"],
val["rxtx_cap"], deleted)
@@ -1021,7 +1020,7 @@ class ImageCommands(object):
machine_images[image_path] = image_metadata
else:
other_images[image_path] = image_metadata
- except Exception as exc:
+ except Exception:
print _("Failed to load %(fn)s.") % locals()
# NOTE(vish): do kernels and ramdisks first so images
self._convert_images(other_images)