Add a hook which is run each #save

- This ends the need for a personal local change... should have done
  this long ago.

darcs-hash:20090807211154-82ea9-8b3e00919a311bdd706c3464f707346b02ef0b75.gz
This commit is contained in:
Richard Darst 2009-08-07 14:11:54 -07:00
parent 739c6f5308
commit 328cf6e92f
1 changed files with 2 additions and 0 deletions

View File

@ -191,6 +191,8 @@ class Config(object):
text = self.enc(text)
if isinstance(text, (str, unicode)):
self.writeToFile(text, rawname+extension)
if hasattr(self, 'save_hook'):
self.save_hook()
def writeToFile(self, string, filename):
"""Write a given string to a file"""
# The reason we have this method just for this is to proxy