From patchwork Tue Oct 13 02:36:19 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Cao, Chen" X-Patchwork-Id: 53287 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9D2ga1q001552 for ; Tue, 13 Oct 2009 02:42:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758880AbZJMCgs (ORCPT ); Mon, 12 Oct 2009 22:36:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758723AbZJMCgs (ORCPT ); Mon, 12 Oct 2009 22:36:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63038 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756131AbZJMCgr (ORCPT ); Mon, 12 Oct 2009 22:36:47 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9D2aKi1013294; Mon, 12 Oct 2009 22:36:21 -0400 Received: from localhost.localdomain (dhcp-66-70-146.nay.redhat.com [10.66.70.146] (may be forged)) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n9D2aHZV006602; Mon, 12 Oct 2009 22:36:18 -0400 From: "Cao, Chen" To: lmr@redhat.com Cc: autotest@test.kernel.org, kvm@vger.kernel.org, "Cao, Chen" Subject: [PATCH] Using shutil.move to move result files in job.py Date: Tue, 13 Oct 2009 10:36:19 +0800 Message-Id: <1255401379-21896-1-git-send-email-kcao@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/client/bin/job.py b/client/bin/job.py index a1c07cc..ebfb3a3 100755 --- a/client/bin/job.py +++ b/client/bin/job.py @@ -938,7 +938,7 @@ class base_job(object): """Clean up and exit""" # We are about to exit 'complete' so clean up the control file. dest = os.path.join(self.resultdir, os.path.basename(self.state_file)) - os.rename(self.state_file, dest) + shutil.move(self.state_file, dest) self.harness.run_complete() self.disable_external_logging()