We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb8290c commit c2b232cCopy full SHA for c2b232c
src/connectedvmware/azext_connectedvmware/pwinput.py
@@ -34,7 +34,10 @@
34
except ImportError:
35
pass # There is no typing module on Python 2, but that's fine because we use the comment-style of type hints.
36
37
-if sys.platform == 'win32':
+if not sys.stdin.isatty():
38
+ def pwinput(prompt='Password: ', mask='*'):
39
+ return sys.stdin.readline().rstrip()
40
+elif sys.platform == 'win32':
41
# For some reason, mypy reports that msvcrt doesn't have getch, ignore this warning:
42
from msvcrt import getch # type: ignore
43
0 commit comments