summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMasanori Itoh <itoumsn@nttdata.co.jp>2011-04-21 00:11:59 +0900
committerMasanori Itoh <itoumsn@nttdata.co.jp>2011-04-21 00:11:59 +0900
commitbc061d052f0faec69329dca80e5ef41954fbf171 (patch)
treeb128995d273e23d124a31f5ad06a50f883b1986d /bin
parent13ef4912b49158b5a845d0fcba43e1fa5a1c1c00 (diff)
parent1a814ba56a696ce796ab7707eacc2ee065c448e8 (diff)
Rebased to trunk rev 1005.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/nova-manage10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/nova-manage b/bin/nova-manage
index adc631318..b2308bc03 100755
--- a/bin/nova-manage
+++ b/bin/nova-manage
@@ -449,7 +449,7 @@ class FixedIpCommands(object):
ctxt = context.get_admin_context()
try:
- if host == None:
+ if host is None:
fixed_ips = db.fixed_ip_get_all(ctxt)
else:
fixed_ips = db.fixed_ip_get_all_by_host(ctxt, host)
@@ -499,7 +499,7 @@ class FloatingIpCommands(object):
"""Lists all floating ips (optionally by host)
arguments: [host]"""
ctxt = context.get_admin_context()
- if host == None:
+ if host is None:
floating_ips = db.floating_ip_get_all(ctxt)
else:
floating_ips = db.floating_ip_get_all_by_host(ctxt, host)
@@ -591,7 +591,7 @@ class VmCommands(object):
_('zone'),
_('index'))
- if host == None:
+ if host is None:
instances = db.instance_get_all(context.get_admin_context())
else:
instances = db.instance_get_all_by_host(
@@ -864,7 +864,7 @@ class InstanceTypeCommands(object):
"""Lists all active or specific instance types / flavors
arguments: [name]"""
try:
- if name == None:
+ if name is None:
inst_types = instance_types.get_all_types()
elif name == "--all":
inst_types = instance_types.get_all_types(True)
@@ -1009,7 +1009,7 @@ class ImageCommands(object):
if (FLAGS.image_service == 'nova.image.local.LocalImageService'
and directory == os.path.abspath(FLAGS.images_path)):
new_dir = "%s_bak" % directory
- os.move(directory, new_dir)
+ os.rename(directory, new_dir)
os.mkdir(directory)
directory = new_dir
for fn in glob.glob("%s/*/info.json" % directory):