summaryrefslogtreecommitdiff
path: root/helpers.py
diff options
context:
space:
mode:
authorjomo <github@jomo.tv>2014-07-27 06:04:31 +0200
committerjomo <github@jomo.tv>2014-07-27 06:04:31 +0200
commite9b0ad656b71841fa23f332ddf8eff43e5cf1986 (patch)
treee7025015b3f4550f4429aa4f84c6ae8b7feb0ea5 /helpers.py
parentd58d975910b5840ec3119f52bfa42fbbc58fc038 (diff)
add path to save/open json file
Diffstat (limited to 'helpers.py')
-rw-r--r--helpers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/helpers.py b/helpers.py
index 25b4091..0bd7b18 100644
--- a/helpers.py
+++ b/helpers.py
@@ -126,7 +126,7 @@ def open_json_file(filename, default):
"""
data = None
try:
- with open(filename) as obj:
+ with open("plugins/redstoner-utils.py.dir/files/%s.json" % filename) as obj:
data = json_loads(obj.read())
except Exception, e:
error("Failed to read from %s: %s" % (filename, e))
@@ -139,7 +139,7 @@ def save_json_file(filename, obj):
filename is the path + name of the file.
"""
try:
- with open(filename, "w") as f:
+ with open("plugins/redstoner-utils.py.dir/files/%s.json" % filename, "w") as f:
f.write(json_dumps(obj))
except Exception, e:
error("Failed to write to %s: %s" % (filename, e))