From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH KVM-AUTOTEST 2/2] Convert images to JPEG using PIL instead of an external program Date: Wed, 12 Aug 2009 16:00:22 +0300 Message-ID: <4A82BCE6.9050703@redhat.com> References: <1250069685-17727-1-git-send-email-avi@redhat.com> <1250069685-17727-3-git-send-email-avi@redhat.com> <1250081076.2921.2.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Lucas Meneghel Rodrigues , kvm@vger.kernel.org To: Lucas Meneghel Rodrigues Return-path: Received: from mx2.redhat.com ([66.187.237.31]:35314 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752113AbZHLNA0 (ORCPT ); Wed, 12 Aug 2009 09:00:26 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7CD0Rpr029512 for ; Wed, 12 Aug 2009 09:00:27 -0400 In-Reply-To: <1250081076.2921.2.camel@localhost.localdomain> Sender: kvm-owner@vger.kernel.org List-ID: On 08/12/2009 03:44 PM, Lucas Meneghel Rodrigues wrote: >> @@ -110,9 +111,8 @@ def barrier_2(vm, words, params, debug_dir, data_scrdump_filename, >> history_scrdump_filename = os.path.join(history_dir, >> "scrdump-step_%s-%s.jpg" % (current_step_num, >> time.strftime("%Y%m%d-%H%M%S"))) >> - kvm_subprocess.run_fg("convert -quality 30 %s %s" % >> - (scrdump_filename, history_scrdump_filename), >> - logging.debug, "(convert) ", timeout=30) >> + image = PIL.Image.open(scrdump_filename) >> + image.save(history_scrdump_filename, format = 'JPEG', quality = 30) >> > Utilities to perform automatic guest installation using step files. > > Looks great, but since the python imaging library is an external > library, we need to handle import failures. We can't guarantee that it > will allways be installed, so we just degrade functionality gracefully > in the case is not present. > Why not require it unconditionally? It's not new and installing it is trivial. -- error compiling committee.c: too many arguments to function