From d3e964c675e57b217390345477904d8e566b6add Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Mon, 4 Jul 2005 14:49:44 +0000 Subject: [PATCH] level attribute... --- pisi/util.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pisi/util.py b/pisi/util.py index 5788a361..01603641 100644 --- a/pisi/util.py +++ b/pisi/util.py @@ -228,13 +228,15 @@ def uncompress(patchFile, compressType="gz", targetDir=None): return filePath -def do_patch(sourceDir, patchFile, p=0): +def do_patch(sourceDir, patchFile, level): """simple function to apply patches..""" cwd = os.getcwd() os.chdir(sourceDir) check_file(patchFile) - cmd = "patch -p%d < %s" % (p, patchFile) + level = int(level) + cmd = "patch -p%d < %s" % (level, patchFile) + print "patch command", cmd p = os.popen(cmd) o = p.readlines() retval = p.close()