summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixelSergey <sergey.ichtchenko@gmail.com>2015-10-31 19:59:55 +0200
committerPixelSergey <sergey.ichtchenko@gmail.com>2015-10-31 19:59:55 +0200
commit398533860bd5242d4089db154173d745d5dbd879 (patch)
tree57301b1bd8c0c830f783898ea1ecb2ef60a832bb
parent0ff5e6eaa16a89aa67bbeb9d8c0a03464be8e77b (diff)
Fixed ugly stacktraces. And the associated bugs.
-rw-r--r--chatalias.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/chatalias.py b/chatalias.py
index e4f72d7..8c5c653 100644
--- a/chatalias.py
+++ b/chatalias.py
@@ -15,8 +15,12 @@
from helpers import *
from traceback import format_exc as trace
+global data = None
def safe_open_json():
+ global data
+ if data is not None:
+ return data
data = open_json_file("aliases")
if data is None:
data = {"gnl":{"max_len":"35","max_entries":"10"}}