Removed unused filterOptions code

master
pictuga 2020-08-21 23:23:33 +02:00
parent c6b52e625f
commit c7c2c5d749
3 changed files with 4 additions and 15 deletions

View File

@ -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

View File

@ -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

View File

@ -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