diff options
author | jomo <github@jomo.tv> | 2014-07-27 19:42:33 +0200 |
---|---|---|
committer | jomo <github@jomo.tv> | 2014-07-27 19:42:33 +0200 |
commit | b1a3a92e49b353dfa42b52b448cdbc3b27bb33f8 (patch) | |
tree | 1b135af4f422d2ebcb96e814c08923d52b2f85c3 /abot.py | |
parent | e9b0ad656b71841fa23f332ddf8eff43e5cf1986 (diff) |
apply file read/save helpers
Diffstat (limited to 'abot.py')
-rw-r--r-- | abot.py | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -1,17 +1,12 @@ -import json from helpers import * from re import compile as reg_compile -answers_filename = "plugins/redstoner-utils.py.dir/files/abot.json" -answers = [] +answers = [] def load_answers(): global answers - try: - answers = json.loads(open(answers_filename).read()) - except Exception, e: - error("Failed to load answers: %s" % e) + answers = open_json_file("abot", []) # compile answers for answer in answers: |