projects
/
rainbowstream.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ignore some FORMAT on config command and display direct link in share function inside...
[rainbowstream.git]
/
rainbowstream
/
config.py
diff --git
a/rainbowstream/config.py
b/rainbowstream/config.py
index e468c9c1d5725625133355d1af816ce99e426838..1573cce1f9a14ea184750469e577ae96ef72c412 100644
(file)
--- a/
rainbowstream/config.py
+++ b/
rainbowstream/config.py
@@
-49,6
+49,8
@@
def get_all_config():
data.pop('ONLY_LIST', None)
data.pop('IGNORE_LIST', None)
data.pop('FORMAT', None)
data.pop('ONLY_LIST', None)
data.pop('IGNORE_LIST', None)
data.pop('FORMAT', None)
+ data.pop('QUOTE_FORMAT', None)
+ data.pop('NOTIFY_FORMAT', None)
return data
except:
return []
return data
except:
return []
@@
-109,7
+111,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
+135,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
+150,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
+164,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: