From 210fbea7e1f2742cb728cdba444be2e64ee2f91f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B0=D0=BC=D0=BE=D1=83=D0=BA=D0=B8=D0=BD=20=D0=90?= =?UTF-8?q?=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?= Date: Wed, 7 Jul 2010 15:44:58 +0400 Subject: [PATCH] Bugfix to function grub() for templates --- pym/cl_template.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pym/cl_template.py b/pym/cl_template.py index 7e336b8..16af8df 100644 --- a/pym/cl_template.py +++ b/pym/cl_template.py @@ -3117,13 +3117,13 @@ os_disk_install not found mount point '\' and '\%s'")%mountPoint) cl_overriding.exit(1) pathGrubConf = "/boot/grub/grub.conf" replace = "" - if access(pathGrubConf,R_OK): + if os.access(pathGrubConf,os.R_OK): reRemoveComments = re.compile("(^|\n)\s*#[^\n]*?(?=\n|$)", re.S) reGrubEntry = re.compile("title.*?(?=title|$)", re.S | re.I ) grubconf = reRemoveComments.sub("",open(pathGrubConf,'r').read()) roothd = filter(lambda x: x[1] == '/', - zip(self.Get('os_disk_grub'), - self.Get('os_install_disk_mount'))) + zip(self.objVar.Get('os_disk_grub'), + self.objVar.Get('os_install_disk_mount'))) if roothd: roothd = "root (hd%s)" % roothd[0][0] replace = ("".join(filter(lambda x: not roothd in x,