From c7c2c5d7499236b8b220534a050ec4c09bf1f276 Mon Sep 17 00:00:00 2001 From: pictuga Date: Fri, 21 Aug 2020 23:23:33 +0200 Subject: [PATCH] Removed unused filterOptions code --- morss/cgi.py | 4 ++-- morss/cli.py | 4 ++-- morss/morss.py | 11 ----------- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/morss/cgi.py b/morss/cgi.py index 4e1accc..3f0bdc5 100644 --- a/morss/cgi.py +++ b/morss/cgi.py @@ -14,7 +14,7 @@ except ImportError: from . import crawler from . import readabilite from .morss import FeedFetch, FeedGather, FeedFormat -from .morss import Options, filterOptions, parseOptions +from .morss import Options, parseOptions from .morss import log, DELAY, DEBUG, MorssException from . import cred @@ -47,7 +47,7 @@ def cgi_parse_environ(environ): raw_options = [] # init - options = Options(filterOptions(parseOptions(raw_options))) + options = Options(parseOptions(raw_options)) global DEBUG DEBUG = options.debug diff --git a/morss/cli.py b/morss/cli.py index 98fef96..c256857 100644 --- a/morss/cli.py +++ b/morss/cli.py @@ -3,12 +3,12 @@ import os.path from . import crawler from .morss import FeedFetch, FeedGather, FeedFormat -from .morss import Options, filterOptions, parseOptions +from .morss import Options, parseOptions from .morss import log, DEBUG def cli_app(): - options = Options(filterOptions(parseOptions(sys.argv[1:-1]))) + options = Options(parseOptions(sys.argv[1:-1])) url = sys.argv[-1] global DEBUG diff --git a/morss/morss.py b/morss/morss.py index 74b0082..4a5c352 100644 --- a/morss/morss.py +++ b/morss/morss.py @@ -36,17 +36,6 @@ TIMEOUT = 4 # http timeout (in sec) DEBUG = False -def filterOptions(options): - return options - - # example of filtering code below - - #allowed = ['proxy', 'clip', 'cache', 'force', 'silent', 'pro', 'debug'] - #filtered = dict([(key,value) for (key,value) in options.items() if key in allowed]) - - #return filtered - - class MorssException(Exception): pass