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 authored and Jakub Roztocil committed 2016-02-29 14:07:08 +08:00
1 parent e2235e56dc
commit dc1371d4d6
1 file changed
+9
+9
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