From: Zac Medico Date: Tue, 31 Jul 2007 03:45:49 +0000 (-0000) Subject: Handle the ENOENT error if the world file doesn't exist. X-Git-Tag: v2.2_pre1~914 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a5de83bc81c775dc658de180e6692052945548f9;p=portage.git Handle the ENOENT error if the world file doesn't exist. svn path=/main/trunk/; revision=7531 --- diff --git a/pym/portage/sets/files.py b/pym/portage/sets/files.py index f5884eea7..a3875ada8 100644 --- a/pym/portage/sets/files.py +++ b/pym/portage/sets/files.py @@ -2,6 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ +import errno import os from portage.util import grabfile, write_atomic, ensure_dirs @@ -52,7 +53,12 @@ class StaticFileSet(EditablePackageSet): except (OSError, IOError): mtime = None if (not self._loaded or self._mtime != mtime): - self.loader.load() + try: + self.loader.load() + except EnvironmentError, e: + if e.errno != errno.ENOENT: + raise + del e self._setAtoms(self.loader.keys()) self._mtime = mtime