Show More
@@ -91,7 +91,12 b' def get_default_editor():' | |||||
91 | # - no isatty method |
|
91 | # - no isatty method | |
92 | for _name in ('stdin', 'stdout', 'stderr'): |
|
92 | for _name in ('stdin', 'stdout', 'stderr'): | |
93 | _stream = getattr(sys, _name) |
|
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 | _is_tty = False |
|
100 | _is_tty = False | |
96 | break |
|
101 | break | |
97 | else: |
|
102 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now