From: Orakaro Date: Sat, 26 Jul 2014 02:55:19 +0000 (+0900) Subject: quick fix sudo installer put file in /root/ bug X-Git-Url: https://vcs.fsf.org/?p=rainbowstream.git;a=commitdiff_plain;h=63388de74a32694faa66df05b93fcbcc72833c48;hp=7348171dfc9d5d69b7f3908bb54d3b9a45e367d2 quick fix sudo installer put file in /root/ bug --- diff --git a/rainbowstream/config.py b/rainbowstream/config.py index 1245ca4..4131295 100644 --- a/rainbowstream/config.py +++ b/rainbowstream/config.py @@ -91,7 +91,11 @@ def set_config(key, value): os.environ.get( 'USERPROFILE', '')) + os.sep + '.rainbow_config.json' - data = load_config(path) + data = {} + try: + data = load_config(path) + except: + pass # Update global config c[key] = value # Update config file @@ -172,7 +176,7 @@ def init_config(): for d in data: c[d] = data[d] except: - print('It seems that ~/.rainbow_config.json has wrong format :(') + pass # Load default theme theme_file = os.path.dirname( __file__) + '/colorset/' + c['THEME'] + '.json' diff --git a/setup.py b/setup.py index 715c919..b8330c6 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages import os, sys # Bumped version -version = '0.4.7' +version = '0.4.8' # Require install_requires = [