From patchwork Wed Apr 29 20:10:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Martin X-Patchwork-Id: 466266 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 040F9140308 for ; Thu, 30 Apr 2015 06:10:32 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="verification failed; unprotected key" header.d=gmail.com header.i=@gmail.com header.b=bmI3Qrv7; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 4CB3495D56; Wed, 29 Apr 2015 20:10:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5ZRoBI8UQTjd; Wed, 29 Apr 2015 20:10:29 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 5B09495D45; Wed, 29 Apr 2015 20:10:29 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 293001C2297 for ; Wed, 29 Apr 2015 20:10:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 246D291697 for ; Wed, 29 Apr 2015 20:10:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IE5+aN6M2OjB for ; Wed, 29 Apr 2015 20:10:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by whitealder.osuosl.org (Postfix) with ESMTPS id 656FC91691 for ; Wed, 29 Apr 2015 20:10:27 +0000 (UTC) Received: by wizk4 with SMTP id k4so194026249wiz.1 for ; Wed, 29 Apr 2015 13:10:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=HuDo+//Zpou9HGbKr1Mreq9AX5xcRKhhVxC60AmidY8=; b=bmI3Qrv7xWYx0pEHl6vr5ezvlUg43gz4lU6Kcn/DolPPtmmSKDTksTKVl02YPDeG+n /pkON6l2T7KrzZ1KEdguO8fCs28mAzQbjYHPBzoh0lTfdkIMV879x5I3QmI8myhskR76 S3luMbtshuUeR1De8N1k0LuKxJfEL3/EkOGO0roTBNklxRRxy2pLKXnmzD6wWXJZ0koj SE6xr0mRMFpb1I3cYlNWNw6uQBp7+xkjAd5YN47xBd09g/FTOp/IANDqS8MIx2hfnQM1 MC9FfXVYI3zV3DubpKn2TVXvmUfVgDT3crA/GQsHYYHlX3CkTMms+wcPvaidv8sCgnfs zlFw== X-Received: by 10.180.96.196 with SMTP id du4mr42196183wib.77.1430338225986; Wed, 29 Apr 2015 13:10:25 -0700 (PDT) Received: from bobook.localdomain (ivr94-4-82-229-165-48.fbx.proxad.net. [82.229.165.48]) by mx.google.com with ESMTPSA id hj10sm69099wjc.48.2015.04.29.13.10.24 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Apr 2015 13:10:24 -0700 (PDT) From: Samuel Martin To: buildroot@buildroot.org Date: Wed, 29 Apr 2015 22:10:15 +0200 Message-Id: <1430338217-25518-1-git-send-email-s.martin49@gmail.com> X-Mailer: git-send-email 2.3.7 Subject: [Buildroot] [autobuild v2 1/3] autobuild-run: prevent send_result from failing when gathering config files X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" os.makedirs() can fail if the directory already exists, so only create it when needed. Signed-off-by: Samuel Martin --- changes v1->v2 - remove useless abspath call --- scripts/autobuild-run | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/autobuild-run b/scripts/autobuild-run index 0e12080..6e83de9 100755 --- a/scripts/autobuild-run +++ b/scripts/autobuild-run @@ -661,7 +661,8 @@ def send_results(result, **kwargs): for fname in files: if fname == 'config.log': - os.makedirs(dest) + if not os.path.exists(dest): + os.makedirs(dest) shutil.copy(os.path.join(root, fname), os.path.join(dest, fname)) copy_config_log_files()