summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorPádraig Brady <pbrady@redhat.com>2012-02-02 10:07:50 +0000
committerPádraig Brady <pbrady@redhat.com>2012-03-16 04:36:26 +0000
commita1c28495aa8d970df0c1afa4efac1d10bdb24825 (patch)
tree7971a2434687d6ec89fc3e90a91c8c0afb32f9eb /nova
parent30b8e35e80486b26eeb71bc62d92bae240cb72f2 (diff)
various cleanups
No functional changes Change-Id: I19e118e6e0c47fccfe5a817e727f3ab27e26aa79
Diffstat (limited to 'nova')
-rw-r--r--nova/utils.py4
-rw-r--r--nova/virt/images.py1
-rw-r--r--nova/virt/libvirt/imagecache.py2
-rw-r--r--nova/virt/libvirt/utils.py6
4 files changed, 5 insertions, 8 deletions
diff --git a/nova/utils.py b/nova/utils.py
index e375f11e5..d2b747090 100644
--- a/nova/utils.py
+++ b/nova/utils.py
@@ -940,7 +940,7 @@ def cleanup_file_locks():
# reliably tell which sentinels refer to which lock in the
# lockfile implementation.
- if FLAGS.disable_process_locking:
+ if FLAGS.disable_process_locking:
return
hostname = socket.gethostname()
@@ -1266,7 +1266,7 @@ def save_and_reraise_exception():
In some cases the exception context can be cleared, resulting in None
being attempted to be reraised after an exception handler is run. This
can happen when eventlet switches greenthreads or when running an
- exception handler, code raises and catches and exception. In both
+ exception handler, code raises and catches an exception. In both
cases the exception context will be cleared.
To work around this, we save the exception state, run handler code, and
diff --git a/nova/virt/images.py b/nova/virt/images.py
index 12510c792..1e0ae0a22 100644
--- a/nova/virt/images.py
+++ b/nova/virt/images.py
@@ -32,7 +32,6 @@ from nova.openstack.common import cfg
from nova import utils
-FLAGS = flags.FLAGS
LOG = logging.getLogger(__name__)
image_opts = [
diff --git a/nova/virt/libvirt/imagecache.py b/nova/virt/libvirt/imagecache.py
index 8b01c27c5..25455a07c 100644
--- a/nova/virt/libvirt/imagecache.py
+++ b/nova/virt/libvirt/imagecache.py
@@ -23,11 +23,9 @@ http://wiki.openstack.org/nova-image-cache-management.
"""
-import datetime
import hashlib
import os
import re
-import sys
import time
from nova import compute
diff --git a/nova/virt/libvirt/utils.py b/nova/virt/libvirt/utils.py
index 0eec1db1a..db7e11b26 100644
--- a/nova/virt/libvirt/utils.py
+++ b/nova/virt/libvirt/utils.py
@@ -53,9 +53,9 @@ def create_image(disk_format, path, size):
:param size: Desired size of disk image. May be given as an int or
a string. If given as an int, it will be interpreted
as bytes. If it's a string, it should consist of a number
- followed by an optional prefix ('k' for kilobytes, 'm'
- for megabytes, 'g' for gigabytes, 't' for terabytes). If no
- prefix is given, it will be interpreted as bytes.
+ with an optional suffix ('K' for Kibibytes,
+ M for Mebibytes, 'G' for Gibibytes, 'T' for Tebibytes).
+ If no suffix is given, it will be interpreted as bytes.
"""
execute('qemu-img', 'create', '-f', disk_format, path, size)