MCPcopy Create free account
hub / github.com/ActiveState/code / commit

Method commit

recipes/Python/577524_Python_Sessions/recipe-577524.py:133–138  ·  view source on GitHub ↗

Commit the changes to the session

(self)

Source from the content-addressed store, hash-verified

131 return True
132
133 def commit(self):
134 """Commit the changes to the session"""
135 if not self.started:
136 raise NotStarted("Session must be started")
137 with open(self.path, "wb") as f:
138 dump(self.data, f, HIGHEST_PROTOCOL)
139
140 def destroy(self):
141 """Destroy the session"""

Callers 15

outputMethod · 0.95
recipe-576960.pyFile · 0.45
recipe-577601.pyFile · 0.45
insert_siblingsMethod · 0.45
insert_childrenMethod · 0.45
deleteMethod · 0.45
create_rootMethod · 0.45
mainFunction · 0.45
_connectMethod · 0.45
contextMethod · 0.45
__init__Method · 0.45
__setitem__Method · 0.45

Calls 3

NotStartedClass · 0.85
openFunction · 0.50
dumpFunction · 0.50

Tested by

no test coverage detected