'Store an association in the association directory.
(str, Association) -> NoneType'

def storeAssociation(self, server_url, association):

    association_s = association.serialize()
    filename = self.getAssociationFilename(server_url, association.handle)
    (tmp_file, tmp) = self._mktemp()
    try:
        try:
            tmp_file.write(association_s)
            os.fsync(tmp_file.fileno())
        finally:
            tmp_file.close()
        try:
            os.rename(tmp, filename)
        except OSError as why:
            if (why.errno != EEXIST):
                raise
            try:
                os.unlink(filename)
            except OSError as why:
                if (why.errno == ENOENT):
                    pass
                else:
                    raise
            os.rename(tmp, filename)
    except:
        _removeIfPresent(tmp)
        raise
