From cd825c9c2c12d443cb732c36960e1f882eb7e492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=B4=E5=A8=83=E9=85=B1?= Date: Sat, 7 Jan 2017 22:07:13 +0800 Subject: [PATCH] typo --- mujson_mgr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mujson_mgr.py b/mujson_mgr.py index ecf473b..c01b23d 100644 --- a/mujson_mgr.py +++ b/mujson_mgr.py @@ -29,7 +29,7 @@ class MuJsonLoader(object): output = json.dumps(self.json, sort_keys=True, indent=4, separators=(',', ': ')) with open(path, 'a'): pass - with open(path, 'r+') as f: + with open(path, 'rb+') as f: f.write(output.encode('utf8')) f.truncate()