From patchwork Mon Jan 23 21:34:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Larson X-Patchwork-Id: 6350 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 699DF23E29 for ; Mon, 23 Jan 2012 21:34:17 +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 4C030A182D7 for ; Mon, 23 Jan 2012 21:34:17 +0000 (UTC) Received: by bkar19 with SMTP id r19so3342583bka.11 for ; Mon, 23 Jan 2012 13:34:17 -0800 (PST) Received: by 10.204.200.197 with SMTP id ex5mr3831393bkb.128.1327354455302; Mon, 23 Jan 2012 13:34:15 -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.204.130.220 with SMTP id u28cs83155bks; Mon, 23 Jan 2012 13:34:15 -0800 (PST) Received: by 10.216.135.162 with SMTP id u34mr4187666wei.1.1327354453899; Mon, 23 Jan 2012 13:34:13 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id z33si10354223weq.140.2012.01.23.13.34.13 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 23 Jan 2012 13:34:13 -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 1RpRWn-0003TR-Lf for ; Mon, 23 Jan 2012 21:34:13 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 9344DE048E for ; Mon, 23 Jan 2012 21:34:13 +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: 199 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 199: one thing missed for bug #897918 Message-Id: <20120123213413.26764.4481.launchpad@ackee.canonical.com> Date: Mon, 23 Jan 2012 21:34:13 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="14713"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: adf36ce2a7187846ac300cbfb45b1e3751efa8fa X-Gm-Message-State: ALoCoQlNduziIE+ripTH2XcPpwIKfcw2PbfGSd3aGiEcIhWZfMYOlRWszVQABMXkBEmFzwmAvbHt ------------------------------------------------------------ revno: 199 committer: Paul Larson branch nick: lava-dispatcher timestamp: Mon 2012-01-23 15:32:05 -0600 message: one thing missed 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 2012-01-17 23:29:04 +0000 +++ lava_dispatcher/utils.py 2012-01-23 21:32:05 +0000 @@ -66,9 +66,11 @@ os.makedirs(cache_dir) os.link(file_location, cache_loc) except OSError, err: - #errno 18 is Invalid cross-device link - if err.errno == 18: + #errno.EXDEV(18) is Invalid cross-device link + if err.errno == errno.EXDEV: shutil.copy(file_location, cache_loc) + if err.errno == errno.EEXIST: + logging.info("Cached copy of %s already exists" % url) else: logging.exception("os.link failed") return file_location