projects
/
rainbowstream.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
working fine in CentOS
[rainbowstream.git]
/
rainbowstream
/
config.py
diff --git
a/rainbowstream/config.py
b/rainbowstream/config.py
index e468c9c1d5725625133355d1af816ce99e426838..58f747de33cf8ab627f1227137cc9e30be5227bc 100644
(file)
--- a/
rainbowstream/config.py
+++ b/
rainbowstream/config.py
@@
-109,7
+109,7
@@
def delete_config(key):
Delete a config key
"""
path = os.path.expanduser("~") + os.sep + '.rainbow_config.json'
Delete a config key
"""
path = os.path.expanduser("~") + os.sep + '.rainbow_config.json'
- try:
+ try:
data = load_config(path)
except:
raise Exception('Config file is messed up.')
data = load_config(path)
except:
raise Exception('Config file is messed up.')
@@
-133,8
+133,9
@@
def reload_config():
"""
Reload config
"""
"""
Reload config
"""
- try:
- rainbow_config = os.path.expanduser("~") + os.sep + '.rainbow_config.json'
+ try:
+ rainbow_config = os.path.expanduser("~") + \
+ os.sep + '.rainbow_config.json'
data = load_config(rainbow_config)
for d in data:
c[d] = data[d]
data = load_config(rainbow_config)
for d in data:
c[d] = data[d]
@@
-147,8
+148,8
@@
def init_config():
Init configuration
"""
# Load the initial config
Init configuration
"""
# Load the initial config
- config = os.path.dirname(
-
__file__) +
'/colorset/config'
+ config = os.path.dirname(
__file__) + \
+ '/colorset/config'
try:
data = load_config(config)
for d in data:
try:
data = load_config(config)
for d in data:
@@
-161,11
+162,11
@@
def init_config():
data = load_config(rainbow_config)
for d in data:
c[d] = data[d]
data = load_config(rainbow_config)
for d in data:
c[d] = data[d]
- except
ValueError
as e:
+ except
(IOError, ValueError)
as e:
c['USER_JSON_ERROR'] = str(e)
# Load default theme
c['USER_JSON_ERROR'] = str(e)
# Load default theme
- theme_file = os.path.dirname(
-
__file__) +
'/colorset/' + c['THEME'] + '.json'
+ theme_file = os.path.dirname(
__file__) + \
+ '/colorset/' + c['THEME'] + '.json'
try:
data = load_config(theme_file)
for d in data:
try:
data = load_config(theme_file)
for d in data: