From 61472608cee7dbb64fabd5b03a7708ba7c9b31a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Fri, 1 Jul 2005 13:05:45 +0000 Subject: [PATCH] =?UTF-8?q?uncompress=20i=C3=A7in=20bz2=20deste=C4=9Fi=20d?= =?UTF-8?q?e=20ekle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pisi/util.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pisi/util.py b/pisi/util.py index b60df0ed..4eca1500 100644 --- a/pisi/util.py +++ b/pisi/util.py @@ -215,14 +215,14 @@ def uncompress(patchFile, compressType="gz", targetDir=None): else: filePath = os.path.basename(patchFile) - fileObj = open(filePath, "w") - if compressType == "gz": from gzip import GzipFile obj = GzipFile(patchFile) + else if compressType = "bz2": + from bz2 import BZ2File + obj = BZ2File(patchFile) - fileObj.write(obj.read()) - fileObj.close() + open(filePath, "w").write(obj.read()) return filePath