'Save the configuration file with all modifications'

def save(self):

    if (not self.cfg):
        return
    fileobj = file(self.cfg, 'w')
    try:
        self.parser.write(fileobj)
    finally:
        fileobj.close()
