From 7d914f78325182d6afadde535bf8c8d966c56729 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 17 Apr 2006 19:57:32 +0000 Subject: [PATCH] Ignore ENOENT errors when $FILESDIR doesn't exist. Thanks to Christian Heim for reporting. svn path=/main/trunk/; revision=3171 --- pym/portage_manifest.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pym/portage_manifest.py b/pym/portage_manifest.py index b062c70ab..1b7135c97 100644 --- a/pym/portage_manifest.py +++ b/pym/portage_manifest.py @@ -137,10 +137,16 @@ class Manifest(object): """ Parse old style digest files for this Manifest instance """ if myhashdict is None: myhashdict = {} - for d in os.listdir(os.path.join(self.pkgdir, "files")): - if d.startswith("digest-"): - self._readManifest(os.path.join(self.pkgdir, "files", d), mytype="DIST", - myhashdict=myhashdict) + try: + for d in os.listdir(os.path.join(self.pkgdir, "files")): + if d.startswith("digest-"): + self._readManifest(os.path.join(self.pkgdir, "files", d), mytype="DIST", + myhashdict=myhashdict) + except (IOError, OSError), e: + if e.errno == errno.ENOENT: + pass + else: + raise return myhashdict def _readManifest(self, file_path, myhashdict=None, **kwargs): -- 2.26.2