Commit 97091992 authored by ale's avatar ale
Browse files

call isatty() on the file handle

parent 0df31d32
import cookielib
import getpass
import os
import urllib2
import urllib
import re
......@@ -44,7 +43,7 @@ class SSOProcessor(urllib2.BaseHandler):
# 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,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment