aboutsummaryrefslogtreecommitdiffstats
path: root/settings.py
diff options
context:
space:
mode:
authorJames Taylor <28744867+user234683@users.noreply.github.com>2020-09-05 21:13:52 -0700
committerGitHub <noreply@github.com>2020-09-05 21:13:52 -0700
commitca8fa3f55efc7cf0d382059b5afcdee131a3d031 (patch)
treef1b40af6004c8393db1875e46802c7c46908db4e /settings.py
parentec9834801886e1e29e87c1166382d7b4020023e2 (diff)
parent799177d651e59c7186ea4ee4346d4dd6e4a174b2 (diff)
downloadyt-local-ca8fa3f55efc7cf0d382059b5afcdee131a3d031.tar.lz
yt-local-ca8fa3f55efc7cf0d382059b5afcdee131a3d031.tar.xz
yt-local-ca8fa3f55efc7cf0d382059b5afcdee131a3d031.zip
Merge pull request #9 from jellelicht/master
Support python >= 3.8 and allow for simpler packaging
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