diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-03-18 23:20:04 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-03-18 23:20:04 +0000 |
| commit | 58bed5a7a07cdc1b302a96c7fa2be13056fa2333 (patch) | |
| tree | ee30b7ecc72f84a60fc138e920232af810136027 | |
| parent | 9e342447c5a7d52cc498561b4636abadd8c997ca (diff) | |
| parent | a1c28495aa8d970df0c1afa4efac1d10bdb24825 (diff) | |
| download | nova-58bed5a7a07cdc1b302a96c7fa2be13056fa2333.tar.gz nova-58bed5a7a07cdc1b302a96c7fa2be13056fa2333.tar.xz nova-58bed5a7a07cdc1b302a96c7fa2be13056fa2333.zip | |
Merge "various cleanups"
| -rw-r--r-- | nova/utils.py | 4 | ||||
| -rw-r--r-- | nova/virt/images.py | 1 | ||||
| -rw-r--r-- | nova/virt/libvirt/imagecache.py | 2 | ||||
| -rw-r--r-- | nova/virt/libvirt/utils.py | 6 |
4 files changed, 5 insertions, 8 deletions
diff --git a/nova/utils.py b/nova/utils.py index a23feea73..ef2b329ba 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -982,7 +982,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() @@ -1308,7 +1308,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) |
