diff options
author | James Taylor <28744867+user234683@users.noreply.github.com> | 2020-09-05 21:13:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-05 21:13:52 -0700 |
commit | ca8fa3f55efc7cf0d382059b5afcdee131a3d031 (patch) | |
tree | f1b40af6004c8393db1875e46802c7c46908db4e | |
parent | ec9834801886e1e29e87c1166382d7b4020023e2 (diff) | |
parent | 799177d651e59c7186ea4ee4346d4dd6e4a174b2 (diff) | |
download | yt-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
-rw-r--r-- | server.py | 1 | ||||
-rw-r--r-- | settings.py | 3 |
2 files changed, 3 insertions, 1 deletions
@@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from gevent import monkey monkey.patch_all() import gevent.socket 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 |