diff -r 176145438b1e -r 422fd05e9c91 eric6/DebugClients/Python/PyProfile.py --- a/eric6/DebugClients/Python/PyProfile.py Thu Jun 25 19:09:55 2020 +0200 +++ b/eric6/DebugClients/Python/PyProfile.py Sat Jun 27 12:08:12 2020 +0200 @@ -10,7 +10,7 @@ import marshal import profile import atexit -import pickle # secok +import pickle class PyProfile(profile.Profile): @@ -56,7 +56,7 @@ timings = marshal.load(cache) # secok if isinstance(timings, dict): self.timings = timings - except Exception: # secok + except (EnvironmentError, EOFError, ValueError, TypeError): pass finally: cache.close() @@ -69,7 +69,7 @@ try: cache = open(self.timingCache, 'wb') marshal.dump(self.timings, cache) - except Exception: # secok + except EnvironmentError: pass finally: cache.close() @@ -86,7 +86,7 @@ try: f = open(file, 'wb') self.create_stats() - pickle.dump(self.stats, f, 2) + pickle.dump(self.stats, f, 4) except (EnvironmentError, pickle.PickleError): pass finally: @@ -178,6 +178,3 @@ # the C function returned "c_return": profile.Profile.trace_dispatch_return, } - -# -# eflag: noqa = M702