Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sso
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
8
Issues
8
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ai
sso
Commits
97091992
Commit
97091992
authored
Sep 17, 2014
by
ale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
call isatty() on the file handle
parent
0df31d32
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
src/python/sso/urllib2_handler.py
src/python/sso/urllib2_handler.py
+1
-2
No files found.
src/python/sso/urllib2_handler.py
View file @
97091992
import
cookielib
import
getpass
import
os
import
urllib2
import
urllib
import
re
...
...
@@ -44,7 +43,7 @@ class SSOProcessor(urllib2.BaseHandler):
if
self
.
_otp_pattern
.
search
(
response_data
):
# Only ask for an OTP when the standard input is a tty,
# otherwise simply don't send any OTP.
if
os
.
isatty
(
sys
.
stdin
):
if
sys
.
stdin
.
isatty
(
):
form_data
[
'otp'
]
=
raw_input
(
'OTP for %s@%s: '
%
(
self
.
_username
,
form_data
[
's'
].
rstrip
(
'/'
)))
newreq
=
urllib2
.
Request
(
request_baseurl
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment