DebugClients/Python3/PyProfile.py

changeset 4563
881340f4bd0c
parent 4543
2e6a880670e9
child 4631
5c1a96925da4
equal deleted inserted replaced
4561:5bc6ed226471 4563:881340f4bd0c
51 try: 51 try:
52 cache = open(self.timingCache, 'rb') 52 cache = open(self.timingCache, 'rb')
53 timings = marshal.load(cache) 53 timings = marshal.load(cache)
54 if isinstance(timings, dict): 54 if isinstance(timings, dict):
55 self.timings = timings 55 self.timings = timings
56 except: 56 except Exception:
57 pass 57 pass
58 finally: 58 finally:
59 cache.close() 59 cache.close()
60 60
61 def save(self): 61 def save(self):
64 """ 64 """
65 # dump the raw timing data 65 # dump the raw timing data
66 try: 66 try:
67 cache = open(self.timingCache, 'wb') 67 cache = open(self.timingCache, 'wb')
68 marshal.dump(self.timings, cache) 68 marshal.dump(self.timings, cache)
69 except: 69 except Exception:
70 pass 70 pass
71 finally: 71 finally:
72 cache.close() 72 cache.close()
73 73
74 # dump the profile data 74 # dump the profile data

eric ide

mercurial