diff options
| author | Salvatore Orlando <salvatore.orlando@eu.citrix.com> | 2010-12-17 11:49:00 +0000 |
|---|---|---|
| committer | Salvatore Orlando <salvatore.orlando@eu.citrix.com> | 2010-12-17 11:49:00 +0000 |
| commit | 6c9ec94d0c9303316ad8f3347532eabf31ca8316 (patch) | |
| tree | 0c729db90c38b4730c8247bded8341f2f170c67b /plugins | |
| parent | 988d6c01b0f6870a21c7294534cdcc01fbf15dc0 (diff) | |
Code reviewed
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/xenapi/etc/xapi.d/plugins/objectstore | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/xenapi/etc/xapi.d/plugins/objectstore b/plugins/xenapi/etc/xapi.d/plugins/objectstore index e17f1ba13..8ee2f748d 100644 --- a/plugins/xenapi/etc/xapi.d/plugins/objectstore +++ b/plugins/xenapi/etc/xapi.d/plugins/objectstore @@ -48,7 +48,7 @@ def is_vdi_pv(session,args): vdi = exists(args, 'vdi-ref') pv=with_vdi_in_dom0(session, vdi, False, lambda dev: _is_vdi_pv('/dev/%s' % dev)) - if (pv): + if pv: return 'true' else: return 'false' @@ -58,11 +58,10 @@ def _is_vdi_pv(dest): output=os.popen('pygrub -qn %s' % dest) pv=False for line in output.readlines(): - #logging.debug("line:",line) #try to find kernel string m=re.search('(?<=kernel:)/.*(?:>)',line) - if (m<>None): - if m.group(0).find('xen')<>-1: + if m: + if m.group(0).find('xen')!=-1: pv=True logging.debug("PV:%d",pv) return pv |
