##// END OF EJS Templates
dispatch: add some assertions to give pytype a helping hand...
Augie Fackler -
r44105:ac8fd215 default
parent child Browse files
Show More
@@ -115,6 +115,8 b' def run():'
115
115
116 # In all cases we try to flush stdio streams.
116 # In all cases we try to flush stdio streams.
117 if util.safehasattr(req.ui, b'fout'):
117 if util.safehasattr(req.ui, b'fout'):
118 assert req.ui is not None # help pytype
119 assert req.ui.fout is not None # help pytype
118 try:
120 try:
119 req.ui.fout.flush()
121 req.ui.fout.flush()
120 except IOError as e:
122 except IOError as e:
@@ -122,6 +124,8 b' def run():'
122 status = -1
124 status = -1
123
125
124 if util.safehasattr(req.ui, b'ferr'):
126 if util.safehasattr(req.ui, b'ferr'):
127 assert req.ui is not None # help pytype
128 assert req.ui.ferr is not None # help pytype
125 try:
129 try:
126 if err is not None and err.errno != errno.EPIPE:
130 if err is not None and err.errno != errno.EPIPE:
127 req.ui.ferr.write(
131 req.ui.ferr.write(
@@ -1108,6 +1112,7 b' def _dispatch(req):'
1108
1112
1109 repo = None
1113 repo = None
1110 cmdpats = args[:]
1114 cmdpats = args[:]
1115 assert func is not None # help out pytype
1111 if not func.norepo:
1116 if not func.norepo:
1112 # use the repo from the request only if we don't have -R
1117 # use the repo from the request only if we don't have -R
1113 if not rpath and not cwd:
1118 if not rpath and not cwd:
General Comments 0
You need to be logged in to leave comments. Login now