diff --git a/filetags.py b/filetags.py index a6a5f7c..8a1cea0 100644 --- a/filetags.py +++ b/filetags.py @@ -366,13 +366,12 @@ if __name__ == "__main__": 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]) print("Tags for file:") - for tag in tags: - print(tag) + print(tags) # create a two dimensional array of all the files associated with each individual tag file_hash_lists = [] 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 common_file_hashes = file_hash_lists[0] # iterate over the two dimensional array @@ -384,8 +383,7 @@ if __name__ == "__main__": if not common_file_hashes == []: print("Files for tag(s):") - for file_hash in common_file_hashes: - print(file_hash) + print(common_file_hashes)