commit:     eeaeb27707890e3f96baaf13493f95e6368f5f13
Author:     Kenneth Raplee <kenrap <AT> kennethraplee <DOT> com>
AuthorDate: Sat Apr  2 01:20:36 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> 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 <kenrap <AT> kennethraplee.com>
Signed-off-by: Sam James <sam <AT> 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:

Reply via email to