DebugClients/Python3/DebugBase.py

changeset 4830
f609a22f43bd
parent 4683
1ba6ba86b383
child 5005
684f5ba04f0b
child 5124
1ba8ee313b57
equal deleted inserted replaced
4829:35fe0232fb8f 4830:f609a22f43bd
300 if not self.__skip_it(frame): 300 if not self.__skip_it(frame):
301 # When stepping with next/until/return in a generator frame, 301 # When stepping with next/until/return in a generator frame,
302 # skip the internal StopIteration exception (with no traceback) 302 # skip the internal StopIteration exception (with no traceback)
303 # triggered by a subiterator run with the 'yield from' 303 # triggered by a subiterator run with the 'yield from'
304 # statement. 304 # statement.
305 if not (frame.f_code.co_flags & CO_GENERATOR 305 if not (frame.f_code.co_flags & CO_GENERATOR and
306 and arg[0] is StopIteration and arg[2] is None): 306 arg[0] is StopIteration and arg[2] is None):
307 self.user_exception(frame, arg) 307 self.user_exception(frame, arg)
308 if self.quitting: 308 if self.quitting:
309 raise bdb.BdbQuit 309 raise bdb.BdbQuit
310 # Stop at the StopIteration or GeneratorExit exception when the user 310 # Stop at the StopIteration or GeneratorExit exception when the user
311 # has set stopframe in a generator by issuing a return command, or a 311 # has set stopframe in a generator by issuing a return command, or a
312 # next/until command at the last statement in the generator before the 312 # next/until command at the last statement in the generator before the
313 # exception. 313 # exception.
314 elif (self.stopframe and frame is not self.stopframe 314 elif (self.stopframe and frame is not self.stopframe and
315 and self.stopframe.f_code.co_flags & CO_GENERATOR 315 self.stopframe.f_code.co_flags & CO_GENERATOR and
316 and arg[0] in (StopIteration, GeneratorExit)): 316 arg[0] in (StopIteration, GeneratorExit)):
317 self.user_exception(frame, arg) 317 self.user_exception(frame, arg)
318 if self.quitting: 318 if self.quitting:
319 raise bdb.BdbQuit 319 raise bdb.BdbQuit
320 320
321 return self.trace_dispatch 321 return self.trace_dispatch

eric ide

mercurial