json save and load without utf-8
authorOrakaro <nhatminh_179@hotmail.com>
Thu, 31 Jul 2014 00:38:37 +0000 (09:38 +0900)
committerOrakaro <nhatminh_179@hotmail.com>
Thu, 31 Jul 2014 00:38:37 +0000 (09:38 +0900)
docs/conf.py
rainbowstream/config.py
setup.py

index a94a09497130df9f01c9c729553ab7712d05eeb1..7d6f76af2d6678f756cd423e6f3c5bc989594f25 100644 (file)
@@ -51,9 +51,9 @@ copyright = u'2014, Vu Nhat Minh'
 # built documents.
 #
 # The short X.Y version.
-version = '0.5.7'
+version = '0.5.8'
 # The full version, including alpha/beta/rc tags.
-release = '0.5.7'
+release = '0.5.8'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
index 860646d78ca29f62375fac264246733a2b699b15..e6c0de2a9e882a26ba62102b2fdcaf1c79e8113b 100644 (file)
@@ -30,7 +30,7 @@ def load_config(filepath):
     """
     Load config from filepath
     """
-    with open(filepath, encoding='utf-8') as f:
+    with open(filepath) as f:
         content = ''.join(f.readlines())
         match = comment_re.search(content)
         while match:
@@ -98,7 +98,7 @@ def set_config(key, value):
     else:
         data[key] = value
     # Save
-    with open(path, 'w', encoding='utf-8') as out:
+    with open(path, 'w') as out:
         json.dump(data, out, indent=4)
     os.system('chmod 777 ' + path)
 
@@ -120,7 +120,7 @@ def delete_config(key):
     else:
         raise Exception('No such config key.')
     # Save
-    with open(path, 'w', encoding='utf-8') as out:
+    with open(path, 'w') as out:
         json.dump(data, out, indent=4)
     os.system('chmod 777 ' + path)
 
index f671f4913193709bc6e5a8d200a21ea9bcff792d..da93a011b324c00accd73e7b890356e74fc5145a 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -5,7 +5,7 @@ import os.path
 import sys
 
 # Bumped version
-version = '0.5.7'
+version = '0.5.8'
 
 # Require
 install_requires = [