Browse Source

refactor: Use json.loads instead of split for list arguments

Cristian 5 years ago
parent
commit
65530e1e5b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      archivebox/config/__init__.py

+ 2 - 2
archivebox/config/__init__.py

@@ -364,9 +364,9 @@ def load_config_val(key: str,
         return int(val)
         return int(val)
 
 
     elif type is list:
     elif type is list:
-        return val.split(" ")
+        return json.loads(val)
 
 
-    raise Exception('Config values can only be str, bool, int or list')
+    raise Exception('Config values can only be str, bool, int or json')
 
 
 
 
 def load_config_file(out_dir: str=None) -> Optional[Dict[str, str]]:
 def load_config_file(out_dir: str=None) -> Optional[Dict[str, str]]: