From patchwork Tue Feb 18 16:20:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yann Diorcet X-Patchwork-Id: 321550 X-Patchwork-Delegate: esben@haabendal.dk Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hugin.dotsrc.org (hugin.dotsrc.org [IPv6:2001:878:346::102]) by ozlabs.org (Postfix) with ESMTP id D86492C00CC for ; Wed, 19 Feb 2014 03:20:45 +1100 (EST) Received: from hugin.dotsrc.org (localhost [127.0.0.1]) by hugin.dotsrc.org (Postfix) with ESMTP id 01ACE3F837 for ; Tue, 18 Feb 2014 17:20:44 +0100 (CET) X-Original-To: dev@oe-lite.org Delivered-To: dev@oe-lite.org Received: from mail-oa0-f53.google.com (mail-oa0-f53.google.com [209.85.219.53]) by hugin.dotsrc.org (Postfix) with ESMTPS id A69613F837 for ; Tue, 18 Feb 2014 17:20:42 +0100 (CET) Received: by mail-oa0-f53.google.com with SMTP id m1so19491460oag.40 for ; Tue, 18 Feb 2014 08:20:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=jKtk/9ZmfdRFkQIrl9YQd7JyQXUsKwXaoO8AuVzsXDM=; b=IaWJjhUpJGYR2EOsu0ykB6biIKrPKyyGGrIKpCULVUKixvi1t34DL2UlaudhCObKYT oF5doVQHaty9c+/uBWEMdlqwvObjyJ8mQAuJrIa4qkTexpp1gQCs7YEmXFIDA5Clb+OW nSPkzcoTnlLIrJoH6RMAqUvbaMDzpp3GMewXLXM9eLwQTBvftCe+eNqVq2ZbU2nrtxDd WYX67aIsA7xoT8SNdGJH1bNGhQ5HQ/6hAn5RLIEwxjbwu6qcyLoqOgwtq0YkVvdly+IK ynpvpQ/BNKYYofwdgbLyrFt3+GRU55jmpuw6taLYTW032MCIN1ZfsaN1N5ywe6V1sXQM 5slQ== MIME-Version: 1.0 X-Received: by 10.60.45.38 with SMTP id j6mr26882938oem.2.1392740440854; Tue, 18 Feb 2014 08:20:40 -0800 (PST) Received: by 10.76.69.9 with HTTP; Tue, 18 Feb 2014 08:20:40 -0800 (PST) Date: Tue, 18 Feb 2014 17:20:40 +0100 Message-ID: Subject: Bug #577 directory as local URI From: Yann Diorcet To: "dev@oe-lite.org" X-BeenThere: dev@oe-lite.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: OE-lite development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dev-bounces@oe-lite.org Errors-To: dev-bounces@oe-lite.org diff --git a/lib/oelite/fetch/local.py b/lib/oelite/fetch/local.py index 4903fe9..9992415 100644 --- a/lib/oelite/fetch/local.py +++ b/lib/oelite/fetch/local.py @@ -32,6 +32,8 @@ class LocalFetcher(): return self._signature except AttributeError: pass + if os.path.isdir(self.localpath): + raise oelite.fetch.NoSignature(self.uri, "can't compute directory signature") m = hashlib.sha1() m.update(open(self.localpath, "r").read()) self._signature = m.digest()