aboutsummaryrefslogtreecommitdiffstats
path: root/settings.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2020-09-05 23:49:28 -0700
committerJames Taylor <user234683@users.noreply.github.com>2020-09-05 23:49:28 -0700
commit3a8f18a1fd8d50cce2a798d44699e9c7da48f331 (patch)
tree22e8209e3910400084fe511867c62486478c13b2 /settings.py
parent06974ef41be942111c472b4c7bc7dd93fd87a1a8 (diff)
parentca8fa3f55efc7cf0d382059b5afcdee131a3d031 (diff)
downloadyt-local-3a8f18a1fd8d50cce2a798d44699e9c7da48f331.tar.lz
yt-local-3a8f18a1fd8d50cce2a798d44699e9c7da48f331.tar.xz
yt-local-3a8f18a1fd8d50cce2a798d44699e9c7da48f331.zip
Merge branch 'master' of https://github.com/user234683/youtube-local
Diffstat (limited to 'settings.py')
-rw-r--r--settings.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/settings.py b/settings.py
index 517e785..7e988f7 100644
--- a/settings.py
+++ b/settings.py
@@ -235,6 +235,7 @@ else:
# parse settings in a safe way, without exec
settings = {}
attributes = {
+ ast.Constant: 'value',
ast.NameConstant: 'value',
ast.Num: 'n',
ast.Str: 's',
@@ -258,7 +259,7 @@ else:
log_ignored_line(node.lineno, target.id + " is not a valid setting")
continue
- if type(node.value) not in (ast.NameConstant, ast.Num, ast.Str):
+ if type(node.value) not in attributes:
log_ignored_line(node.lineno, "only literals allowed for values")
continue