From 945e77cb4bd9f8865c1f83f7a14e8d63cb68383a Mon Sep 17 00:00:00 2001 From: ccl Date: Fri, 4 Dec 2020 16:40:07 +0100 Subject: [PATCH] no more doubles --- etherpump/commands/pull.py | 1 + 1 file changed, 1 insertion(+) diff --git a/etherpump/commands/pull.py b/etherpump/commands/pull.py index e5b7fec..bf8290f 100644 --- a/etherpump/commands/pull.py +++ b/etherpump/commands/pull.py @@ -382,6 +382,7 @@ async def handle_pad(args, padid, data, info, session): ########################################## pattern = r'__[a-zA-Z0-9]+?__' magic_words = re.findall(pattern, text) + magic_words = list(set(magic_words)) if magic_words: meta["magicwords"] = magic_words print('FOUND MAGIC WORD(s): {} in {}'.format(magic_words, padid))