Skip to content

Commit

Permalink
updated initConnection to layer 73, suppressed getpass warning for IDEs
Browse files Browse the repository at this point in the history
  • Loading branch information
nikat committed Jan 22, 2018
1 parent 7aef629 commit aa8214c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion signin-cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import getpass
import hashlib
import base64
import warnings

from localsettings import TL_LAYER

Expand Down Expand Up @@ -74,7 +75,9 @@ def receive(jstream):

def prompt_string(prompt: str, hide: bool=False):
if hide:
ret = getpass.getpass(prompt=prompt + ' ')
with warnings.catch_warnings():
warnings.simplefilter("ignore")
ret = getpass.getpass(prompt=prompt + ' ')
else:
sys.stderr.write(prompt + ' ')
sys.stderr.flush()
Expand Down Expand Up @@ -108,6 +111,8 @@ def prompt_string(prompt: str, hide: bool=False):
system_version=command_line_args.system_version,
app_version=command_line_args.app_version,
lang_code=command_line_args.lang_code,
system_lang_code=command_line_args.lang_code,
lang_pack='',
_wrapped=dict(
_cons='auth.sendCode',
phone_number=phone_number,
Expand Down

0 comments on commit aa8214c

Please sign in to comment.