From a7a5212cbd31ced0bbb30c6c5e60dc1a24cca1d3 Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Wed, 30 Jun 2010 11:17:56 -0500 Subject: fix typos in node from merge --- nova/compute/node.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'nova') diff --git a/nova/compute/node.py b/nova/compute/node.py index c217056f5..29ff7ca8a 100644 --- a/nova/compute/node.py +++ b/nova/compute/node.py @@ -30,7 +30,7 @@ import base64 import json import logging import os -import random +import shutil import sys from nova import vendor @@ -456,7 +456,7 @@ class Instance(object): # ensure directories exist and are writable yield self._pool.simpleExecute('mkdir -p %s' % basepath()) yield self._pool.simpleExecute('chmod 0777 %s' % basepath()) - + # TODO(termie): these are blocking calls, it would be great # if they weren't. @@ -464,11 +464,11 @@ class Instance(object): f = open(basepath('libvirt.xml'), 'w') f.write(libvirt_xml) f.close() - + if FLAGS.fake_libvirt: logging.info('fake_libvirt, nothing to do for create_image') raise defer.returnValue(None); - + if FLAGS.use_s3: _fetch_file = self._fetch_s3_image else: @@ -495,7 +495,7 @@ class Instance(object): * 1024 * 1024 * 1024) yield disk.partition( basepath('disk-raw'), basepath('disk'), bytes, execute=execute) - + @defer.inlineCallbacks @exception.wrap_exception def spawn(self): @@ -506,7 +506,7 @@ class Instance(object): self.set_state(Instance.NOSTATE, 'launching') logging.info('self %s', self) try: - yield self._create_image(xml) + yield self._create_image(xml) self._conn.createXML(xml, 0) # TODO(termie): this should actually register # a callback to check for successful boot @@ -528,7 +528,7 @@ class Instance(object): local_d.callback(None) timer.f = _wait_for_boot timer.start(interval=0.5, now=True) - except Exception: + except Exception, ex: logging.debug(ex) self.set_state(Instance.SHUTDOWN) -- cgit