Remove old hashtags while updating hashtag swarm

main
Bob Mottram 2022-04-24 18:02:09 +01:00
parent 94f9daeec4
commit 3c17749dae
1 changed files with 1 additions and 1 deletions

View File

@ -200,6 +200,7 @@ def _update_cached_hashtag_swarm(base_dir: str, nickname: str, domain: str,
except OSError: except OSError:
print('EX: unable to write cached hashtag swarm ' + print('EX: unable to write cached hashtag swarm ' +
cached_hashtag_swarm_filename) cached_hashtag_swarm_filename)
remove_old_hashtags(base_dir, 3)
return False return False
@ -270,7 +271,6 @@ def store_hash_tags(base_dir: str, nickname: str, domain: str,
except OSError as ex: except OSError as ex:
print('EX: Failed to write entry to tags file ' + print('EX: Failed to write entry to tags file ' +
tags_filename + ' ' + str(ex)) tags_filename + ' ' + str(ex))
remove_old_hashtags(base_dir, 3)
# automatically assign a category to the tag if possible # automatically assign a category to the tag if possible
category_filename = tags_dir + '/' + tag_name + '.category' category_filename = tags_dir + '/' + tag_name + '.category'