| https://code.djangoproject.com/changeset/15911 |
| |
| Index: /django/trunk/django/utils/autoreload.py |
| =================================================================== |
| --- /django/trunk/django/utils/autoreload.py (revision 15883) |
| +++ /django/trunk/django/utils/autoreload.py (revision 15911) |
| @@ -74,9 +74,10 @@ |
| def ensure_echo_on(): |
| if termios: |
| - fd = sys.stdin.fileno() |
| - attr_list = termios.tcgetattr(fd) |
| - if not attr_list[3] & termios.ECHO: |
| - attr_list[3] |= termios.ECHO |
| - termios.tcsetattr(fd, termios.TCSANOW, attr_list) |
| + fd = sys.stdin |
| + if fd.isatty(): |
| + attr_list = termios.tcgetattr(fd) |
| + if not attr_list[3] & termios.ECHO: |
| + attr_list[3] |= termios.ECHO |
| + termios.tcsetattr(fd, termios.TCSANOW, attr_list) |
| |
| def reloader_thread(): |