Don't try asking for username/password when input is not a terminal
Review Request #7956 — Created Feb. 11, 2016 and submitted
This fixes a mysterious "hang" when running rbt using native Windows Python in
a Cygwin terminal emulator such as MinTTY: in this case, password entry doesn't
work correctly and even the prompt is not displayed.
I'm submitting this after wasting half an hour trying to diagnose the problem with "rbt post hanging" before realizing what it was really due to. This may seem to be an unusual case, but it's not the first time I run into it and IMHO it can't make things worse.
Also a question: there is very similar code in
utils/users.py
which I didn't modify as I don't quite understand when exactly it is used and so couldn't test it. But it probably should be modified in the same way, shouldn't it? Or, perhaps, it could be refactored to reuse the same code in both places?
Ran it from a "normal" DOS window and from MinTTY and got the expected prompt in the former case and the expected error in the latter.
Description | From | Last Updated |
---|---|---|
Col: 80 E501 line too long (82 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (82 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (82 > 79 characters) |
reviewbot | |
Col: 1 E101 indentation contains mixed spaces and tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 2 E101 indentation contains mixed spaces and tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 2 E101 indentation contains mixed spaces and tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 2 E101 indentation contains mixed spaces and tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 2 E101 indentation contains mixed spaces and tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 2 E101 indentation contains mixed spaces and tabs |
reviewbot | |
Col: 1 W191 indentation contains tabs |
reviewbot | |
Col: 2 E101 indentation contains mixed spaces and tabs |
reviewbot | |
Col: 1 E101 indentation contains mixed spaces and tabs |
reviewbot | |
flushed |
brennie |
-
Tool: Pyflakes Processed Files: rbtools/commands/__init__.py Tool: PEP8 Style Checker Processed Files: rbtools/commands/__init__.py
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Change Summary:
-
Fixed TABs introduced while reflowing the comment to fix line length checks
- Diff:
-
Revision 3 (+17)
-
Tool: PEP8 Style Checker Processed Files: rbtools/commands/__init__.py Tool: Pyflakes Processed Files: rbtools/commands/__init__.py
-
Tool: Pyflakes Processed Files: rbtools/commands/__init__.py Tool: PEP8 Style Checker Processed Files: rbtools/commands/__init__.py