From patchwork Tue Jan 17 23:33:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Larson X-Patchwork-Id: 6273 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 90FB723F03 for ; Tue, 17 Jan 2012 23:33:20 +0000 (UTC) Received: from mail-bk0-f52.google.com (mail-bk0-f52.google.com [209.85.214.52]) by fiordland.canonical.com (Postfix) with ESMTP id 76A5EA1842F for ; Tue, 17 Jan 2012 23:33:20 +0000 (UTC) Received: by bkbzt4 with SMTP id zt4so2398088bkb.11 for ; Tue, 17 Jan 2012 15:33:20 -0800 (PST) Received: by 10.205.139.66 with SMTP id iv2mr7693256bkc.27.1326843200172; Tue, 17 Jan 2012 15:33:20 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.205.82.144 with SMTP id ac16cs132878bkc; Tue, 17 Jan 2012 15:33:19 -0800 (PST) Received: by 10.180.77.200 with SMTP id u8mr32217367wiw.18.1326843198588; Tue, 17 Jan 2012 15:33:18 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id q4si17225837wie.17.2012.01.17.15.33.18 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 17 Jan 2012 15:33:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1RnIWk-0004hS-8R for ; Tue, 17 Jan 2012 23:33:18 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 30D9DE03D7 for ; Tue, 17 Jan 2012 23:33:18 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-dispatcher X-Launchpad-Branch: ~linaro-validation/lava-dispatcher/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 193 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 193: Fix for bug 897918 Message-Id: <20120117233318.30760.81486.launchpad@ackee.canonical.com> Date: Tue, 17 Jan 2012 23:33:18 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="14676"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 33fdd6d69ad9eb50f2e17893e203afe15040261d Merge authors: Paul Larson Related merge proposals: https://code.launchpad.net/~pwlars/lava-dispatcher/fix-897918/+merge/88440 proposed by: Paul Larson (pwlars) review: Needs Fixing - Zygmunt Krynicki (zkrynicki) ------------------------------------------------------------ revno: 193 [merge] committer: Paul Larson branch nick: lava-dispatcher timestamp: Tue 2012-01-17 17:31:15 -0600 message: Fix for bug 897918 modified: lava_dispatcher/utils.py --- lp:lava-dispatcher https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk You are subscribed to branch lp:lava-dispatcher. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription === modified file 'lava_dispatcher/utils.py' --- lava_dispatcher/utils.py 2011-11-24 04:07:12 +0000 +++ lava_dispatcher/utils.py 2012-01-17 23:29:04 +0000 @@ -18,6 +18,7 @@ # along # with this program; if not, see . +import errno import logging import os import shutil @@ -51,8 +52,10 @@ try: os.link(cache_loc, file_location) except OSError, err: - if err.errno == 18: + if err.errno == errno.EXDEV: shutil.copy(cache_loc, file_location) + if err.errno == errno.EEXIST: + logging.info("Cached copy of %s already exists" % url) else: logging.exception("os.link failed") else: