From: Michael Goldish Subject: [PATCH 09/19] KVM test: kvm_config.py: remove unused function get_match_block_indices() Date: Wed, 9 Sep 2009 21:12:02 +0300 Message-ID: <1252519932-30733-9-git-send-email-mgoldish@redhat.com> References: <1252519932-30733-1-git-send-email-mgoldish@redhat.com> <1252519932-30733-2-git-send-email-mgoldish@redhat.com> <1252519932-30733-3-git-send-email-mgoldish@redhat.com> <1252519932-30733-4-git-send-email-mgoldish@redhat.com> <1252519932-30733-5-git-send-email-mgoldish@redhat.com> <1252519932-30733-6-git-send-email-mgoldish@redhat.com> <1252519932-30733-7-git-send-email-mgoldish@redhat.com> <1252519932-30733-8-git-send-email-mgoldish@redhat.com> Cc: Michael Goldish To: autotest@test.kernel.org, kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:53998 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753954AbZIISPe (ORCPT ); Wed, 9 Sep 2009 14:15:34 -0400 In-Reply-To: <1252519932-30733-8-git-send-email-mgoldish@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_config.py | 27 --------------------------- 1 files changed, 0 insertions(+), 27 deletions(-) diff --git a/client/tests/kvm/kvm_config.py b/client/tests/kvm/kvm_config.py index da7988b..405de4b 100755 --- a/client/tests/kvm/kvm_config.py +++ b/client/tests/kvm/kvm_config.py @@ -99,33 +99,6 @@ class config: return [dict for dict in list if self.match(filter, dict)] - # Currently unused, will be removed if it remains unused - def get_match_block_indices(self, filter, list=None): - """ - Get the indexes of a list that match a given filter. - - @param filter: A regular expression that will filter the list. - @param list: List which we want to know the indexes that match a filter. - """ - if list is None: - list = self.list - block_list = [] - prev_match = False - for index in range(len(list)): - dict = list[index] - if self.match(filter, dict): - if not prev_match: - block_list.append([index]) - prev_match = True - else: - if prev_match: - block_list[-1].append(index) - prev_match = False - if prev_match: - block_list[-1].append(len(list)) - return block_list - - def split_and_strip(self, str, sep="="): """ Split str and strip quotes from the resulting parts. -- 1.5.4.1