From 5087ca7278df43cc962e431e9dbbf64b25891e20 Mon Sep 17 00:00:00 2001 From: "A. Murat Eren" Date: Tue, 16 Aug 2005 12:32:35 +0000 Subject: [PATCH] =?UTF-8?q?=202882=20numaral=C4=B1=20commit=20ile=20sa?= =?UTF-8?q?=C3=A7malayan=20de=C4=9Fi=C5=9Fken=20ismi=20d=C3=BCzeltildi=20(?= =?UTF-8?q?=C5=9Fimdilik=20b=C3=B6yle=20mixesCaps=20kals=C4=B1n=20o=20de?= =?UTF-8?q?=C4=9Fi=C5=9Fken,=20d=C3=BCzeltece=C4=9Fim=20daha=20d=C3=BCzg?= =?UTF-8?q?=C3=BCn=20bir=20=C5=9Fekilde)..?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Değişken isimlendirme esnasında, dikkatli olmalıyız. --- pisi/util.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pisi/util.py b/pisi/util.py index 8ca9b02b..629b67db 100644 --- a/pisi/util.py +++ b/pisi/util.py @@ -230,7 +230,7 @@ def copy_file(src,dest): check_dir(os.path.dirname(dest)) shutil.copyfile(src, dest) -def get_file_hashes(top, exclude_prefix=None, remove_prefix=None): +def get_file_hashes(top, exclude_prefix=None, removePrefix=None): """Generator function iterates over a toplevel path and returns the (filePath, sha1Hash) tuple for all files. If excludePrefixes list is given as a parameter, function will exclude the filePaths @@ -239,8 +239,8 @@ def get_file_hashes(top, exclude_prefix=None, remove_prefix=None): given.""" def has_excluded_prefix(filename): - if exclude_prefix and remove_prefix: - tempfnam = remove_prefix(remove_prefix, filename) + if exclude_prefix and removePrefix: + tempfnam = remove_prefix(removePrefix, filename) for p in exclude_prefix: if tempfnam.startswith(p): return 1 @@ -253,7 +253,7 @@ def get_file_hashes(top, exclude_prefix=None, remove_prefix=None): #yield the symlink.. #bug 373 yield (root, sha1_data(os.readlink(root))) - exclude_prefix.append(remove_prefix(remove_prefix, root) + "/") + exclude_prefix.append(remove_prefix(removePrefix, root) + "/") continue if os.path.isdir(root) and not has_excluded_prefix(root):