From 7aa774b4efcaf923520c09c003436c4261a017ee Mon Sep 17 00:00:00 2001 From: Kacper Ziubryniewicz Date: Mon, 20 Aug 2018 23:12:36 +0200 Subject: [PATCH] Update utils.py --- fbchat/utils.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fbchat/utils.py b/fbchat/utils.py index d03288e..16ed658 100644 --- a/fbchat/utils.py +++ b/fbchat/utils.py @@ -259,3 +259,9 @@ def get_emojisize_from_tags(tags): except (KeyError, IndexError): log.exception('Could not determine emoji size from {} - {}'.format(tags, tmp)) return None + +def require_list(list_): + if isinstance(list_, list): + return set(list_) + else: + return set([list_])