From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5EF9E139083 for ; Mon, 18 Sep 2017 00:00:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AA23F1FC007; Mon, 18 Sep 2017 00:00:00 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8590E1FC007 for ; Mon, 18 Sep 2017 00:00:00 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3665933BEBE for ; Sun, 17 Sep 2017 23:59:59 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9865B6AA2 for ; Sun, 17 Sep 2017 23:59:57 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1505692751.0d1d2b8dccdd5ce9f99358fe842fb968a0423a25.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/sync/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/sync/syncbase.py X-VCS-Directories: pym/portage/sync/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 0d1d2b8dccdd5ce9f99358fe842fb968a0423a25 X-VCS-Branch: master Date: Sun, 17 Sep 2017 23:59:57 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 11a3d10f-4bf6-468e-ac4e-a887a33dd74b X-Archives-Hash: 67c9f81e822c5da6e427fa9eefc3ce56 commit: 0d1d2b8dccdd5ce9f99358fe842fb968a0423a25 Author: Nicolas Porcel gmail com> AuthorDate: Sun Sep 17 23:29:27 2017 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun Sep 17 23:59:11 2017 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=0d1d2b8d Fix emerge --info when using webrsync (bug 630538) When calling retrieve_head from a SyncBase object, it is expected to raise a NotImplementedError. However, all classes that do not inherit from NewBase will raise an AttributeError which is not caught. Fixes: 0e1699ad6b3f ("emerge: Add head commit per repo to --info") pym/portage/sync/syncbase.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pym/portage/sync/syncbase.py b/pym/portage/sync/syncbase.py index 05e4d69d4..43b667fb0 100644 --- a/pym/portage/sync/syncbase.py +++ b/pym/portage/sync/syncbase.py @@ -102,6 +102,10 @@ class SyncBase(object): paths.extend(_SUBMODULE_PATH_MAP[name]) return tuple(paths) + def retrieve_head(self, **kwargs): + '''Get information about the head commit''' + raise NotImplementedError + class NewBase(SyncBase): '''Subclasses Syncbase adding a new() and runs it @@ -133,7 +137,3 @@ class NewBase(SyncBase): '''Update existing repository ''' raise NotImplementedError - - def retrieve_head(self, **kwargs): - '''Get information about the head commit''' - raise NotImplementedError