Removed unused filterOptions code
parent
c6b52e625f
commit
c7c2c5d749
|
@ -14,7 +14,7 @@ except ImportError:
|
||||||
from . import crawler
|
from . import crawler
|
||||||
from . import readabilite
|
from . import readabilite
|
||||||
from .morss import FeedFetch, FeedGather, FeedFormat
|
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 .morss import log, DELAY, DEBUG, MorssException
|
||||||
|
|
||||||
from . import cred
|
from . import cred
|
||||||
|
@ -47,7 +47,7 @@ def cgi_parse_environ(environ):
|
||||||
raw_options = []
|
raw_options = []
|
||||||
|
|
||||||
# init
|
# init
|
||||||
options = Options(filterOptions(parseOptions(raw_options)))
|
options = Options(parseOptions(raw_options))
|
||||||
|
|
||||||
global DEBUG
|
global DEBUG
|
||||||
DEBUG = options.debug
|
DEBUG = options.debug
|
||||||
|
|
|
@ -3,12 +3,12 @@ import os.path
|
||||||
|
|
||||||
from . import crawler
|
from . import crawler
|
||||||
from .morss import FeedFetch, FeedGather, FeedFormat
|
from .morss import FeedFetch, FeedGather, FeedFormat
|
||||||
from .morss import Options, filterOptions, parseOptions
|
from .morss import Options, parseOptions
|
||||||
from .morss import log, DEBUG
|
from .morss import log, DEBUG
|
||||||
|
|
||||||
|
|
||||||
def cli_app():
|
def cli_app():
|
||||||
options = Options(filterOptions(parseOptions(sys.argv[1:-1])))
|
options = Options(parseOptions(sys.argv[1:-1]))
|
||||||
url = sys.argv[-1]
|
url = sys.argv[-1]
|
||||||
|
|
||||||
global DEBUG
|
global DEBUG
|
||||||
|
|
|
@ -36,17 +36,6 @@ TIMEOUT = 4 # http timeout (in sec)
|
||||||
DEBUG = False
|
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):
|
class MorssException(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue