- print('''IMPORTANT: During the SAML auth, you were redirected from {0} to {1}. This probably '''
- '''means you should specify {1} as the server for final connection, but we're not 100% '''
- '''sure about this. You should probably try both.\n'''.format(args.server, server), file=stderr)
+ if args.ignore_redirects:
+ print('''IMPORTANT: During the SAML auth, you were redirected from {0} to {1}. This probably '''
+ '''means you should specify {1} as the server for final connection, but we're not 100% '''
+ '''sure about this. You should probably try both; if necessary, use the '''
+ '''--ignore-redirects option to specify desired behavior.\n'''.format(args.server, server), file=stderr)
+ else:
+ print('''IMPORTANT: During the SAML auth, you were redirected from {0} to {1}, however the '''
+ '''redirection was ignored because you specified --ignore-redirects.\n'''.format(args.server, server), file=stderr)