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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3AFE015808B for ; Mon, 4 Apr 2022 19:05:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 43E32E0882; Mon, 4 Apr 2022 19:05:01 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A9244E07B3 for ; Mon, 4 Apr 2022 19:05:00 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A595F341345 for ; Mon, 4 Apr 2022 19:04:59 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1362D38C for ; Mon, 4 Apr 2022 19:04:58 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1649099077.eeaeb27707890e3f96baaf13493f95e6368f5f13.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/manifest.py X-VCS-Directories: lib/portage/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: eeaeb27707890e3f96baaf13493f95e6368f5f13 X-VCS-Branch: master Date: Mon, 4 Apr 2022 19:04:58 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 7ca23edd-fa2b-44ce-97f0-ac6d00992ced X-Archives-Hash: 4b10fe80e561afc1b8f69d4b677364e9 commit: eeaeb27707890e3f96baaf13493f95e6368f5f13 Author: Kenneth Raplee kennethraplee com> AuthorDate: Sat Apr 2 01:20:36 2022 +0000 Commit: Sam James gentoo org> CommitDate: Mon Apr 4 19:04:37 2022 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=eeaeb277 Simplify by inlining a single use method Signed-off-by: Kenneth Raplee kennethraplee.com> Signed-off-by: Sam James gentoo.org> lib/portage/manifest.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/lib/portage/manifest.py b/lib/portage/manifest.py index 4eb6dc18c..f0fe1fbca 100644 --- a/lib/portage/manifest.py +++ b/lib/portage/manifest.py @@ -182,11 +182,16 @@ class Manifest: self.fhashdict = {t: {} for t in MANIFEST2_IDENTIFIERS} if not from_scratch: - self._read() - if fetchlist_dict != None: - self.fetchlist_dict = fetchlist_dict - else: - self.fetchlist_dict = {} + # Parse Manifest file for this instance + try: + self._readManifest(self.getFullname(), myhashdict=self.fhashdict) + except FileNotFound: + pass + + self.fetchlist_dict = {} + if fetchlist_dict: + self.fetchlist_dict.update(fetchlist_dict) + self.distdir = distdir self.thin = thin if thin: @@ -232,13 +237,6 @@ class Manifest: else: raise - def _read(self): - """Parse Manifest file for this instance""" - try: - self._readManifest(self.getFullname(), myhashdict=self.fhashdict) - except FileNotFound: - pass - def _parseManifestLines(self, mylines): """Parse manifest lines and return a list of manifest entries.""" for myline in mylines: