'Remove the keyed message; raise KeyError if it doesn\'t exist.'

def remove(self, key):

    path = os.path.join(self._path, str(key))
    try:
        f = open(path, 'rb+')
    except IOError as e:
        if (e.errno == errno.ENOENT):
            raise KeyError(('No    message    with    key:    %s' % key))
        else:
            raise
    else:
        f.close()
        os.remove(path)
