##// END OF EJS Templates
hooks: be even more forgiven of non-fd descriptors (issue3711)...
Matt Mackall -
r17964:2c638967 stable
parent child Browse files
Show More
@@ -158,8 +158,8 b' def hook(ui, repo, name, throw=False, **'
158 sys.__stdout__.flush()
158 sys.__stdout__.flush()
159 oldstdout = os.dup(stdoutno)
159 oldstdout = os.dup(stdoutno)
160 os.dup2(stderrno, stdoutno)
160 os.dup2(stderrno, stdoutno)
161 except AttributeError:
161 except (OSError, AttributeError):
162 # __stdout__/__stderr__ has no fileno(), not a real file
162 # files seem to be bogus, give up on redirecting (WSGI, etc)
163 pass
163 pass
164
164
165 if util.safehasattr(cmd, '__call__'):
165 if util.safehasattr(cmd, '__call__'):
General Comments 0
You need to be logged in to leave comments. Login now