Michael Merickel
2015-02-25 effb37e411bbfc51b85c4488ea1c78f311ba7eb5
Merge pull request #1593 from davisagli/fix.reloader-non-tty-backport

1.5 backport: only reset terminal echo flag if stdin is a tty
2 files modified
18 ■■■■ changed files
CHANGES.txt 7 ●●●●● patch | view | raw | blame | history
pyramid/scripts/pserve.py 11 ●●●● patch | view | raw | blame | history
CHANGES.txt
@@ -1,3 +1,10 @@
1.5.4 (unreleased)
==================
- Fix regression where ``pserve --reload`` would not work when running
  as a daemon.
  Backported from https://github.com/Pylons/pyramid/pull/1592
.. _changes_1.5.3:
1.5.3 (2015-02-22)
pyramid/scripts/pserve.py
@@ -716,11 +716,12 @@
def ensure_echo_on(): # pragma: no cover
    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 install_reloader(poll_interval=1, extra_files=None): # pragma: no cover
    """