From a955e212ce0721da5ef7513c32f2b63389149ddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20D=C3=B6nmez?= Date: Wed, 26 Oct 2005 21:46:34 +0000 Subject: [PATCH] =?UTF-8?q?remove=5Fprefix=20hem=20fonksiyon=20ismi=20hem?= =?UTF-8?q?=20de=20de=C4=9Fi=C5=9Fken=20ismi=20olarak=20kullan=C4=B1lm?= =?UTF-8?q?=C4=B1=C5=9F.=20Lisp=20kullansak=20b=C3=B6yle=20olur=20muydu=20?= =?UTF-8?q?ACABA=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pisi/util.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pisi/util.py b/pisi/util.py index 35a45bf6..b39dc729 100644 --- a/pisi/util.py +++ b/pisi/util.py @@ -263,7 +263,7 @@ def copy_file(src,dest): # FIXME: this should be done in a much much simpler way # as it stands, it seems to be a kludge to solve # an unrelated problem -def get_file_hashes(top, exclude_prefix=None, remove_prefix=None): +def get_file_hashes(top, excludePrefix=None, removePrefix=None): """Generator function iterates over a toplevel path and returns the (filePath, sha1Hash) tuples for all files. If excludePrefixes list is given as a parameter, function will exclude the filePaths @@ -295,9 +295,9 @@ def get_file_hashes(top, exclude_prefix=None, remove_prefix=None): return def has_excluded_prefix(filename): - if exclude_prefix and remove_prefix: - tempfnam = remove_prefix(remove_prefix, filename) - for p in exclude_prefix: + if excludePrefix and removePrefix: + tempfnam = remove_prefix(removePrefix, filename) + for p in excludePrefix: if tempfnam.startswith(p): return 1 return 0 @@ -308,7 +308,7 @@ def get_file_hashes(top, exclude_prefix=None, remove_prefix=None): #yield the symlink.. #bug 373 yield (root, sha1_sum(os.readlink(root), True)) - exclude_prefix.append(remove_prefix(remove_prefix, root) + "/") + excludePrefix.append(remove_prefix(removePrefix, root) + "/") continue #bug 397 @@ -316,7 +316,7 @@ def get_file_hashes(top, exclude_prefix=None, remove_prefix=None): d = join_path(root, dir) if os.path.islink(d) and not has_excluded_prefix(d): yield (d, sha1_sum(os.readlink(d), True)) - exclude_prefix.append(remove_prefix(remove_prefix, d) + "/") + excludePrefix.append(remove_prefix(removePrefix, d) + "/") #bug 340 if os.path.isdir(root) and not has_excluded_prefix(root):