diff -r ed2eaa573ca5 -r 927a2f8b3669 DebugClients/Python3/PyProfile.py --- a/DebugClients/Python3/PyProfile.py Sat Oct 19 11:14:51 2013 +0200 +++ b/DebugClients/Python3/PyProfile.py Sat Oct 19 11:49:31 2013 +0200 @@ -117,7 +117,7 @@ """ # get module name from __file__ if not isinstance(frame, profile.Profile.fake_frame) and \ - '__file__' in frame.f_globals: + '__file__' in frame.f_globals: root, ext = os.path.splitext(frame.f_globals['__file__']) if ext in ['.pyc', '.py', '.py3', '.pyo']: fixedName = root + '.py' @@ -148,7 +148,7 @@ rframe, rframe.f_back, frame, frame.f_back) self.trace_dispatch_return(rframe, 0) - assert (self.cur is None or \ + assert (self.cur is None or frame.f_back is self.cur[-2]), ("Bad call", self.cur[-3]) fcode = frame.f_code @@ -171,4 +171,4 @@ "c_exception": profile.Profile.trace_dispatch_return, # the C function returned "c_return": profile.Profile.trace_dispatch_return, - } + }