From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Raspl Subject: Re: [PATCH v2 10/11] tools/kvm_stat: sort '-f help' output Date: Tue, 12 Dec 2017 14:59:25 +0100 Message-ID: <05da08d8-e5cc-e160-513c-9e30533e854f@linux.vnet.ibm.com> References: <20171211112529.33706-1-raspl@linux.vnet.ibm.com> <20171211112529.33706-11-raspl@linux.vnet.ibm.com> Reply-To: raspl@linux.vnet.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: pbonzini@redhat.com, rkrcmar@redhat.com, Marc Hartmayer To: Janosch Frank , kvm@vger.kernel.org Return-path: Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:58456 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752810AbdLLN7j (ORCPT ); Tue, 12 Dec 2017 08:59:39 -0500 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vBCDtvvj124889 for ; Tue, 12 Dec 2017 08:59:39 -0500 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0a-001b2d01.pphosted.com with ESMTP id 2etgcf0bww-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 12 Dec 2017 08:59:38 -0500 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 12 Dec 2017 13:59:28 -0000 In-Reply-To: Content-Language: en-US Sender: kvm-owner@vger.kernel.org List-ID: On 11.12.2017 13:20, Janosch Frank wrote: > On 11.12.2017 12:25, Stefan Raspl wrote: >> diff --git a/tools/kvm/kvm_stat/kvm_stat b/tools/kvm/kvm_stat/kvm_stat >> index 42c34b8818f7..929c8379d82a 100755 >> --- a/tools/kvm/kvm_stat/kvm_stat >> +++ b/tools/kvm/kvm_stat/kvm_stat >> @@ -33,6 +33,7 @@ import resource >> import struct >> import re >> import subprocess >> +from sets import Set > > What's the reason for this import, shouldn't set be built in from at > least 2.7 on? It even seems to be 2.4. The module should be deprecated > from 2.6 on. > >> + event_list.sort() >> + sys.stdout.write(' ' + '\n '.join(sorted(Set(event_list))) + '\n') Ah, now I know what mean: Use the built-in 'set' instead of 'Set'? Yup, good point, will do. Ciao, Stefan