From 97ccc15db066ac9e37641b1ee27bf0e776445a0c Mon Sep 17 00:00:00 2001 From: pictuga Date: Sun, 23 Aug 2020 14:24:23 +0200 Subject: [PATCH] cgi.py: rename parseOptions to parse_options --- morss/cgi.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/morss/cgi.py b/morss/cgi.py index 92d87b6..68c891a 100644 --- a/morss/cgi.py +++ b/morss/cgi.py @@ -19,7 +19,7 @@ from .morss import Options, log, DELAY, MorssException from . import cred -def parseOptions(options): +def parse_options(options): """ Turns ['md=True'] into {'md':True} """ out = {} @@ -27,14 +27,7 @@ def parseOptions(options): split = option.split('=', 1) if len(split) > 1: - if split[0].lower() == 'true': - out[split[0]] = True - - elif split[0].lower() == 'false': - out[split[0]] = False - - else: - out[split[0]] = split[1] + out[split[0]] = split[1] else: out[split[0]] = True @@ -62,6 +55,7 @@ def cgi_parse_environ(environ): if len(split) > 1: url = split[1] + else: url = '' @@ -69,7 +63,7 @@ def cgi_parse_environ(environ): raw_options = [] # init - options = Options(parseOptions(raw_options)) + options = Options(parse_options(raw_options)) return (url, options)