diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-03-03 14:44:47 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-03-03 14:44:47 +0300 |
commit | 3e57f806fb240db38d1aa392b283db47d538b924 (patch) | |
tree | c59a1a446824c62a225027cc0bd9c2f5b45b274a | |
parent | get.py: don't import cgi (diff) | |
download | linux-status-3e57f806fb240db38d1aa392b283db47d538b924.tar.gz linux-status-3e57f806fb240db38d1aa392b283db47d538b924.zip |
Revert "get.py: don't import cgi"
This reverts commit 2eaa4fc9ab517b0ef0c21272766551ab3191c5ea.
On second thought, I have a plan on how to deal with the performance
issue.
Diffstat (limited to '')
-rwxr-xr-x | cgi-bin/get.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cgi-bin/get.py b/cgi-bin/get.py index da8f4c7..500f081 100755 --- a/cgi-bin/get.py +++ b/cgi-bin/get.py @@ -6,6 +6,7 @@ # Distributed under the MIT License. import abc +import cgi from collections import namedtuple from concurrent.futures import ThreadPoolExecutor import json @@ -15,7 +16,6 @@ import shlex import socket import subprocess from subprocess import DEVNULL, PIPE, STDOUT -import urllib.parse def split_by(xs, sep): @@ -308,8 +308,8 @@ def systemd_users(): def do(): - params = urllib.parse.parse_qs(os.environ['QUERY_STRING']) - what = params['what'][0] + params = cgi.FieldStorage() + what = params['what'].value if what == 'status': response = StatusTask().complete() elif what == 'timers': |