diff options
author | jcass <john.cass77@gmail.com> | 2015-11-22 11:40:05 +0200 |
---|---|---|
committer | jcass <john.cass77@gmail.com> | 2015-11-22 11:40:05 +0200 |
commit | 7af6c07623520c6aa1bf51f5a230ee3078042832 (patch) | |
tree | 582f106ea5ac2ceb3915f75c717b04cf25bf4623 /pydora | |
parent | 49d7f06794f1117ea0f285a876ecad8a1c7e4bff (diff) | |
download | pydora-7af6c07623520c6aa1bf51f5a230ee3078042832.tar.bz2 pydora-7af6c07623520c6aa1bf51f5a230ee3078042832.tar.xz pydora-7af6c07623520c6aa1bf51f5a230ee3078042832.zip |
Workaround for issue #29 on OSX
Diffstat (limited to 'pydora')
-rw-r--r-- | pydora/utils.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pydora/utils.py b/pydora/utils.py index fdbbf8d..be8381c 100644 --- a/pydora/utils.py +++ b/pydora/utils.py | |||
@@ -39,7 +39,11 @@ class Screen(object): | |||
39 | 39 | ||
40 | @staticmethod | 40 | @staticmethod |
41 | def set_echo(enabled): | 41 | def set_echo(enabled): |
42 | |||
42 | fd = sys.stdin.fileno() | 43 | fd = sys.stdin.fileno() |
44 | if not os.isatty(fd): | ||
45 | return | ||
46 | |||
43 | (iflag, oflag, cflag, | 47 | (iflag, oflag, cflag, |
44 | lflag, ispeed, ospeed, cc) = termios.tcgetattr(fd) | 48 | lflag, ispeed, ospeed, cc) = termios.tcgetattr(fd) |
45 | 49 | ||