From ccae356fe90f32dec33161a1a6c6fc551a14cfe4 Mon Sep 17 00:00:00 2001 From: "A. Murat Eren" Date: Thu, 26 Apr 2007 12:50:02 +0000 Subject: [PATCH] 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 41ae1071..f06ef3d3 100644 --- a/pisi/util.py +++ b/pisi/util.py @@ -299,7 +299,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): @@ -309,7 +308,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."""