Delete this node from config files

def delete(self):
        """ Delete this node from config files """
        cfg_file = "/etc/nago/nago.ini"
        config = ConfigParser.ConfigParser()
        config.read(cfg_file)
        result = {}
        token = self.data.pop("token", self.token)
        if token not in config.sections():
            raise Exception("Cannot find node in config. Delete aborted.")
        config.remove_section(self.token)
        with open(cfg_file, 'w') as f:
            return config.write(f)