From 67fd551088842d948d21329b9d7c034716e09b21 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 14 Mar 2006 00:57:36 +0000 Subject: Handle FileNotFound errors instead of ENOENT errors when doing permissions for the distlocks subdir. svn path=/main/trunk/; revision=2873 --- pym/portage.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pym/portage.py b/pym/portage.py index ad040dd70..48388b277 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -1849,12 +1849,9 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks", distlocks_subdir = os.path.join(mysettings["DISTDIR"], locks_in_subdir) try: distdir_perms(distlocks_subdir) - except OSError, oe: - if oe.errno == errno.ENOENT: - os.mkdir(distlocks_subdir) - distdir_perms(distlocks_subdir) - else: - raise oe + except portage_exceptions.FileNotFound: + os.mkdir(distlocks_subdir) + distdir_perms(distlocks_subdir) if not os.access(distlocks_subdir, os.W_OK): writemsg("!!! No write access to write to %s. Aborting.\n" % distlocks_subdir) return 0 -- cgit v1.2.3-1-g7c22