def write_file(self):
        try:
            f = tempfile.NamedTemporaryFile(dir=os.path.dirname(self._fileloc),
                                            delete=False)
            json.dump(self._servers, f)
            f.close()
            utils.atomic_rename(f.name, self._fileloc)
        except __HOLE__:
            print "Couldn't open {0} for writing".format(fileloc)
            return False
        return True
dataset/ETHPy150Open medek/elixir_complete.vim/python/ecclient/server_list.py/ServerList.write_file