From: Zac Medico Date: Mon, 17 Apr 2006 19:57:32 +0000 (-0000) Subject: Ignore ENOENT errors when $FILESDIR doesn't exist. Thanks to Christian Heim for... X-Git-Tag: v2.1_pre10~102 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7d914f78325182d6afadde535bf8c8d966c56729;p=portage.git Ignore ENOENT errors when $FILESDIR doesn't exist. Thanks to Christian Heim for reporting. svn path=/main/trunk/; revision=3171 --- 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):