summaryrefslogtreecommitdiffstats
path: root/gallery_dl/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/config.py')
-rw-r--r--gallery_dl/config.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/gallery_dl/config.py b/gallery_dl/config.py
index d014293..0b2aca8 100644
--- a/gallery_dl/config.py
+++ b/gallery_dl/config.py
@@ -102,7 +102,8 @@ def load(files=None, strict=False, load=util.json_loads):
log.error(exc)
sys.exit(1)
except Exception as exc:
- log.warning("Could not parse '%s': %s", path, exc)
+ log.error("%s when loading '%s': %s",
+ exc.__class__.__name__, path, exc)
if strict:
sys.exit(2)
else:
@@ -118,7 +119,7 @@ def clear():
_config.clear()
-def get(path, key, default=None, *, conf=_config):
+def get(path, key, default=None, conf=_config):
"""Get the value of property 'key' or a default value"""
try:
for p in path:
@@ -128,7 +129,7 @@ def get(path, key, default=None, *, conf=_config):
return default
-def interpolate(path, key, default=None, *, conf=_config):
+def interpolate(path, key, default=None, conf=_config):
"""Interpolate the value of 'key'"""
if key in conf:
return conf[key]
@@ -142,7 +143,7 @@ def interpolate(path, key, default=None, *, conf=_config):
return default
-def interpolate_common(common, paths, key, default=None, *, conf=_config):
+def interpolate_common(common, paths, key, default=None, conf=_config):
"""Interpolate the value of 'key'
using multiple 'paths' along a 'common' ancestor
"""
@@ -174,7 +175,7 @@ def interpolate_common(common, paths, key, default=None, *, conf=_config):
return default
-def accumulate(path, key, *, conf=_config):
+def accumulate(path, key, conf=_config):
"""Accumulate the values of 'key' along 'path'"""
result = []
try:
@@ -193,7 +194,7 @@ def accumulate(path, key, *, conf=_config):
return result
-def set(path, key, value, *, conf=_config):
+def set(path, key, value, conf=_config):
"""Set the value of property 'key' for this session"""
for p in path:
try:
@@ -203,7 +204,7 @@ def set(path, key, value, *, conf=_config):
conf[key] = value
-def setdefault(path, key, value, *, conf=_config):
+def setdefault(path, key, value, conf=_config):
"""Set the value of property 'key' if it doesn't exist"""
for p in path:
try:
@@ -213,7 +214,7 @@ def setdefault(path, key, value, *, conf=_config):
return conf.setdefault(key, value)
-def unset(path, key, *, conf=_config):
+def unset(path, key, conf=_config):
"""Unset the value of property 'key'"""
try:
for p in path: