From 1376d140147e8db3a1d6ed68191c4156d13b4a1a Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Thu, 26 Apr 2007 13:09:56 +0000 Subject: [PATCH] [MERGE] we don' need to calculate the size of a symlink. --- pisi/util.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pisi/util.py b/pisi/util.py index 68228639..5fd4b6b8 100644 --- a/pisi/util.py +++ b/pisi/util.py @@ -302,7 +302,6 @@ def dir_size(dir): def sizes(): for root, dirs, files in os.walk(dir): yield sum([os.path.getsize(join_path(root, name)) for name in files if not os.path.islink(join_path(root, name))]) - yield sum([long(len(os.readlink((join_path(root, name))))) for name in files if os.path.islink(join_path(root, name))]) return sum(sizes()) def copy_file(src,dest): @@ -312,7 +311,7 @@ def copy_file(src,dest): shutil.copyfile(src, dest) def is_ar_file(file_path): - return open(file_path).readline().strip() == '!' + return open(file_path).readline().strip() == '!' def clean_ar_timestamps(ar_file): """Zero all timestamps in the ar files."""