Show More
@@ -91,7 +91,12 def get_default_editor(): | |||
|
91 | 91 | # - no isatty method |
|
92 | 92 | for _name in ('stdin', 'stdout', 'stderr'): |
|
93 | 93 | _stream = getattr(sys, _name) |
|
94 | if not _stream or not hasattr(_stream, 'isatty') or not _stream.isatty(): | |
|
94 | try: | |
|
95 | if not _stream or not hasattr(_stream, "isatty") or not _stream.isatty(): | |
|
96 | _is_tty = False | |
|
97 | break | |
|
98 | except ValueError: | |
|
99 | # stream is closed | |
|
95 | 100 | _is_tty = False |
|
96 | 101 | break |
|
97 | 102 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now