summaryrefslogtreecommitdiffstats
path: root/nova/utils.py
diff options
context:
space:
mode:
authorZhongyue Luo <lzyeval@gmail.com>2012-02-02 14:15:39 +0900
committerZhongyue Luo <lzyeval@gmail.com>2012-02-08 08:52:43 +0800
commit525ba40417256f6448c52939274ee2505fbc6b78 (patch)
treef149ac4f1874c6a070738734a2bf0eb69316f3ed /nova/utils.py
parentb0a708f67407256a449414a000b070752e51dba2 (diff)
downloadnova-525ba40417256f6448c52939274ee2505fbc6b78.tar.gz
nova-525ba40417256f6448c52939274ee2505fbc6b78.tar.xz
nova-525ba40417256f6448c52939274ee2505fbc6b78.zip
Backslash continuations (misc.)
Fixes bug #925166 This patch for packages which have few backslash continuations. Follow up patches will be for packages network, scheduler, virt, db/sqlalchemy, tests, and api/openstack. Change-Id: I4200010b47b33fa8b9115b5d379b543200f6668d
Diffstat (limited to 'nova/utils.py')
-rw-r--r--nova/utils.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/nova/utils.py b/nova/utils.py
index f9ffe3adc..aae581b3f 100644
--- a/nova/utils.py
+++ b/nova/utils.py
@@ -222,8 +222,7 @@ def execute(*cmd, **kwargs):
_returncode = obj.returncode # pylint: disable=E1101
if _returncode:
LOG.debug(_('Result was %s') % _returncode)
- if not ignore_exit_code \
- and _returncode not in check_exit_code:
+ if not ignore_exit_code and _returncode not in check_exit_code:
(stdout, stderr) = result
raise exception.ProcessExecutionError(
exit_code=_returncode,
@@ -415,12 +414,12 @@ def usage_from_instance(instance_ref, network_info=None, **kw):
disk_gb=instance_ref['root_gb'] + instance_ref['ephemeral_gb'],
display_name=instance_ref['display_name'],
created_at=str(instance_ref['created_at']),
- launched_at=str(instance_ref['launched_at']) \
+ launched_at=str(instance_ref['launched_at'])
if instance_ref['launched_at'] else '',
image_ref_url=image_ref_url,
state=instance_ref['vm_state'],
- state_description=instance_ref['task_state'] \
- if instance_ref['task_state'] else '')
+ state_description=instance_ref['task_state']
+ if instance_ref['task_state'] else '')
if network_info is not None:
usage_info['fixed_ips'] = network_info.fixed_ips()
@@ -804,7 +803,7 @@ def synchronized(name, external=False):
@functools.wraps(f)
def inner(*args, **kwargs):
# NOTE(soren): If we ever go natively threaded, this will be racy.
- # See http://stackoverflow.com/questions/5390569/dyn\
+ # See http://stackoverflow.com/questions/5390569/dyn
# amically-allocating-and-destroying-mutexes
if name not in _semaphores:
_semaphores[name] = semaphore.Semaphore()