handle single files in get_file_hashes().

This commit is contained in:
Barış Metin
2005-08-30 20:03:24 +00:00
parent 247c76b7b8
commit 447ad0c6d0
+4
View File
@@ -236,6 +236,10 @@ def get_file_hashes(top, exclude_prefix=None, removePrefix=None):
used to remove prefix from filePath while matching excludes, if
given."""
# also handle single files
if os.path.isfile(top):
return top, sha1_file(top)
def has_excluded_prefix(filename):
if exclude_prefix and removePrefix:
tempfnam = remove_prefix(removePrefix, filename)