From 557f186345e253ae18ca29ba6de4d35f459b1b63 Mon Sep 17 00:00:00 2001 From: "A. Murat Eren" Date: Mon, 6 Mar 2006 14:46:53 +0000 Subject: [PATCH] =?UTF-8?q?=20os.path.getsize'a=20gerek=20yok,=20kendi=20f?= =?UTF-8?q?onksiyonumuz=20var=20bu=20i=C5=9F=20i=C3=A7in..=20try=20except?= =?UTF-8?q?=20blo=C4=9Funun=20da=20anlam=C4=B1=20kalm=C4=B1yor=20bu=20duru?= =?UTF-8?q?mda..?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pisi/build.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pisi/build.py b/pisi/build.py index 1c8ebb51..6ba79950 100644 --- a/pisi/build.py +++ b/pisi/build.py @@ -480,10 +480,7 @@ class Builder: for fpath, fhash in util.get_file_hashes(path, collisions, install_dir): frpath = util.removepathprefix(install_dir, fpath) # relative path ftype, permanent = get_file_type(frpath, package.files, install_dir) - try: # broken links and empty dirs can cause problem - fsize = os.path.getsize(fpath) - except OSError: - fsize = None + fsize = util.dir_size(fpath) d[frpath] = FileInfo(path=frpath, type=ftype, permanent=permanent, size=fsize, hash=fhash)