fixed a bug reulting in a variable getten overwritten instead of appended
parent
0928d90472
commit
86ae33a18d
|
@ -366,13 +366,12 @@ if __name__ == "__main__":
|
||||||
if file_is_in_storage(storage_directory, file_tags_or_hash[0], compress):
|
if file_is_in_storage(storage_directory, file_tags_or_hash[0], compress):
|
||||||
tags = get_tags_by_hash(storage_directory, file_tags_or_hash[0])
|
tags = get_tags_by_hash(storage_directory, file_tags_or_hash[0])
|
||||||
print("Tags for file:")
|
print("Tags for file:")
|
||||||
for tag in tags:
|
print(tags)
|
||||||
print(tag)
|
|
||||||
|
|
||||||
# create a two dimensional array of all the files associated with each individual tag
|
# create a two dimensional array of all the files associated with each individual tag
|
||||||
file_hash_lists = []
|
file_hash_lists = []
|
||||||
for tag in file_tags_or_hash:
|
for tag in file_tags_or_hash:
|
||||||
file_hash_lists = get_hashes_by_tag(storage_directory, tag)
|
file_hash_lists = file_hash_lists + [get_hashes_by_tag(storage_directory, tag)]
|
||||||
# take the first of the arrays in the two dimensional array
|
# take the first of the arrays in the two dimensional array
|
||||||
common_file_hashes = file_hash_lists[0]
|
common_file_hashes = file_hash_lists[0]
|
||||||
# iterate over the two dimensional array
|
# iterate over the two dimensional array
|
||||||
|
@ -384,8 +383,7 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
if not common_file_hashes == []:
|
if not common_file_hashes == []:
|
||||||
print("Files for tag(s):")
|
print("Files for tag(s):")
|
||||||
for file_hash in common_file_hashes:
|
print(common_file_hashes)
|
||||||
print(file_hash)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue