##// END OF EJS Templates
dispatch: minor code refactor...
Gregory Szorc -
r38014:e9c58880 default
parent child Browse files
Show More
@@ -87,16 +87,19 b' def run():'
87 req = request(pycompat.sysargv[1:])
87 req = request(pycompat.sysargv[1:])
88 err = None
88 err = None
89 try:
89 try:
90 status = (dispatch(req) or 0)
90 status = dispatch(req) or 0
91 except error.StdioError as e:
91 except error.StdioError as e:
92 err = e
92 err = e
93 status = -1
93 status = -1
94
95 # In all cases we try to flush stdio streams.
94 if util.safehasattr(req.ui, 'fout'):
96 if util.safehasattr(req.ui, 'fout'):
95 try:
97 try:
96 req.ui.fout.flush()
98 req.ui.fout.flush()
97 except IOError as e:
99 except IOError as e:
98 err = e
100 err = e
99 status = -1
101 status = -1
102
100 if util.safehasattr(req.ui, 'ferr'):
103 if util.safehasattr(req.ui, 'ferr'):
101 try:
104 try:
102 if err is not None and err.errno != errno.EPIPE:
105 if err is not None and err.errno != errno.EPIPE:
General Comments 0
You need to be logged in to leave comments. Login now