summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEwan Mellor <ewan.mellor@citrix.com>2011-01-07 20:26:25 +0000
committerEwan Mellor <ewan.mellor@citrix.com>2011-01-07 20:26:25 +0000
commit5ca8ec42037ed4e2a1475bf29064f61068308687 (patch)
tree9ca0bb7826c6a91dca7fd7856dbac730c4d694dd
parente92f0a9352bf7de0f42951b5b6f1bb452a609bf6 (diff)
downloadnova-5ca8ec42037ed4e2a1475bf29064f61068308687.tar.gz
nova-5ca8ec42037ed4e2a1475bf29064f61068308687.tar.xz
nova-5ca8ec42037ed4e2a1475bf29064f61068308687.zip
Fix pep8 errors.
-rw-r--r--nova/image/glance.py2
-rw-r--r--nova/virt/xenapi/vm_utils.py18
2 files changed, 10 insertions, 10 deletions
diff --git a/nova/image/glance.py b/nova/image/glance.py
index e40468364..3f8982c51 100644
--- a/nova/image/glance.py
+++ b/nova/image/glance.py
@@ -113,7 +113,7 @@ class ParallaxClient(object):
if res.status == 200:
# TODO(ewanmellor): Temporary hack! We should be parsing
# the response from Glance properly.
- return { 'url': '/images/%s' % image_id }
+ return {'url': '/images/%s' % image_id}
else:
# TODO(jaypipes): log the error?
return None
diff --git a/nova/virt/xenapi/vm_utils.py b/nova/virt/xenapi/vm_utils.py
index 98427acee..c5bd83b27 100644
--- a/nova/virt/xenapi/vm_utils.py
+++ b/nova/virt/xenapi/vm_utils.py
@@ -344,8 +344,8 @@ class VMHelper(HelperBase):
cls._lookup_image_objectstore(session, vdi_ref)
return
- @classmethod
- def _lookup_image_objectstore(cls,session,vdi_ref):
+ @classmethod
+ def _lookup_image_objectstore(cls, session, vdi_ref):
logging.debug("Looking up vdi %s for PV kernel", vdi_ref)
fn = "is_vdi_pv"
args = {}
@@ -360,25 +360,25 @@ class VMHelper(HelperBase):
logging.debug("PV Kernel in VDI:%d", pv)
return pv
- @classmethod
- def _lookup_image_glance(cls,session,vdi_ref):
+ @classmethod
+ def _lookup_image_glance(cls, session, vdi_ref):
logging.debug("Looking up vdi %s for PV kernel", vdi_ref)
-
+
def is_vdi_pv(dev):
logging.debug("Running pygrub against %s", dev)
output = os.popen('pygrub -qn /dev/%s' % dev)
pv = False
for line in output.readlines():
#try to find kernel string
- m = re.search('(?<=kernel:)/.*(?:>)',line)
+ m = re.search('(?<=kernel:)/.*(?:>)', line)
if m:
- if m.group(0).find('xen')!=-1:
+ if m.group(0).find('xen') != -1:
pv = True
- logging.debug("PV:%d",pv)
+ logging.debug("PV:%d", pv)
return pv
pv = with_vdi_attached_here(session, vdi_ref, False, is_vdi_pv)
return pv
-
+
@classmethod
def lookup(cls, session, i):
"""Look the instance i up, and returns it if available"""