Remove function to build parser to make diff smaller
This commit is contained in:
parent
1c3109cb9e
commit
5d4be274ee
@ -100,7 +100,6 @@ def parseOpts(overrideArguments=None, overrideIgnoreConfig=True):
|
|||||||
pass
|
pass
|
||||||
return opts
|
return opts
|
||||||
|
|
||||||
def create_parser():
|
|
||||||
# No need to wrap help messages if we're on a wide console
|
# No need to wrap help messages if we're on a wide console
|
||||||
columns = compat_get_terminal_size().columns
|
columns = compat_get_terminal_size().columns
|
||||||
max_width = columns if columns else 80
|
max_width = columns if columns else 80
|
||||||
@ -213,11 +212,16 @@ def parseOpts(overrideArguments=None, overrideIgnoreConfig=True):
|
|||||||
help='Make all connections via IPv6 (experimental)',
|
help='Make all connections via IPv6 (experimental)',
|
||||||
)
|
)
|
||||||
network.add_option(
|
network.add_option(
|
||||||
'--cn-verification-proxy',
|
'--geo-verification-proxy',
|
||||||
dest='cn_verification_proxy', default=None, metavar='URL',
|
dest = 'geo_verification_proxy', default = None, metavar = 'URL',
|
||||||
help='Use this proxy to verify the IP address for some Chinese sites. '
|
help = 'Use this proxy to verify the IP address for some geo-restricted sites. '
|
||||||
'The default proxy specified by --proxy (or none, if the options is not present) is used for the actual downloading. (experimental)'
|
'The default proxy specified by --proxy (or none, if the options is not present) is used for the actual downloading. (experimental)'
|
||||||
)
|
)
|
||||||
|
network.add_option(
|
||||||
|
'--cn-verification-proxy',
|
||||||
|
dest = 'cn_verification_proxy', default = None, metavar = 'URL',
|
||||||
|
help = optparse.SUPPRESS_HELP,
|
||||||
|
)
|
||||||
|
|
||||||
selection = optparse.OptionGroup(parser, 'Video Selection')
|
selection = optparse.OptionGroup(parser, 'Video Selection')
|
||||||
selection.add_option(
|
selection.add_option(
|
||||||
@ -794,10 +798,6 @@ def parseOpts(overrideArguments=None, overrideIgnoreConfig=True):
|
|||||||
parser.add_option_group(authentication)
|
parser.add_option_group(authentication)
|
||||||
parser.add_option_group(postproc)
|
parser.add_option_group(postproc)
|
||||||
|
|
||||||
return parser
|
|
||||||
|
|
||||||
parser = create_parser()
|
|
||||||
|
|
||||||
def compat_conf(conf):
|
def compat_conf(conf):
|
||||||
if sys.version_info < (3,):
|
if sys.version_info < (3,):
|
||||||
return [a.decode(preferredencoding(), 'replace') for a in conf]
|
return [a.decode(preferredencoding(), 'replace') for a in conf]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user