summaryrefslogtreecommitdiffstats
path: root/Scripts/emotes_v2.py
diff options
context:
space:
mode:
Diffstat (limited to 'Scripts/emotes_v2.py')
-rw-r--r--Scripts/emotes_v2.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Scripts/emotes_v2.py b/Scripts/emotes_v2.py
index 165db7c..aaf8d18 100644
--- a/Scripts/emotes_v2.py
+++ b/Scripts/emotes_v2.py
@@ -68,8 +68,12 @@ class EmotesState:
self.bits = {}
def load(self, pickle_path):
- with open(pickle_path, 'rb') as f:
- self.bits = pickle.load(f)
+ try:
+ with open(pickle_path, 'rb') as f:
+ self.bits = pickle.load(f)
+ except FileNotFoundError:
+ print(f"Emotes map does not exist at {pickle_path}",
+ file=sys.stderr)
# This is quite slow since we do a search and replace (O(n))
# for each keyword O(m) times each variant of said keyword (O(k)).