'Remove all messages from `queue`.'

def _purge(self, queue):

    count = 0
    queue_find = ((u'.' + queue) + u'.msg')
    folder = os.listdir(self.data_folder_in)
    while (len(folder) > 0):
        filename = folder.pop()
        try:
            if (filename.find(queue_find) < 0):
                continue
            filename = os.path.join(self.data_folder_in, filename)
            os.remove(filename)
            count += 1
        except OSError:
            pass
    return count
