From 63388de74a32694faa66df05b93fcbcc72833c48 Mon Sep 17 00:00:00 2001 From: Orakaro Date: Sat, 26 Jul 2014 11:55:19 +0900 Subject: [PATCH] quick fix sudo installer put file in /root/ bug --- rainbowstream/config.py | 8 ++++++-- setup.py | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) 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 = [ -- 2.25.1