Implemented --max-redirects option

Added argument to argparse, changed client so that it uses a new
requests Session() with the number of redirects and a single test to
show the setting works.
This commit is contained in:
James Carr 2014-07-31 00:02:03 +01:00 committed by Jakub Roztocil
parent e2235e56dc
commit dc1371d4d6

View File

@ -380,6 +380,15 @@ sessions.add_argument(
"""
)
sessions.add_argument(
'--max-redirects',
dest='redirects',
default=30,
help="""
By default, requests has a limit of 30 redirects.
"""
)
#######################################################################
# Authentication