From ccea8172b47c34eb64e298c1a66a8199423d5e07 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 15 Apr 2009 18:43:23 +0000 Subject: =?UTF-8?q?Bug=20#266211=20-=20Handle=20ESTALE=20like=20ENOENT=20i?= =?UTF-8?q?n=20fetch=20and=20locking=20code.=20Thanks=20to=20Krzysztof=20O?= =?UTF-8?q?l=C4=99dzki=20=20for=20the=20initial=20patch?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn path=/main/trunk/; revision=13347 --- pym/portage/locks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pym/portage/locks.py') diff --git a/pym/portage/locks.py b/pym/portage/locks.py index 36bc085bf..05a65644f 100644 --- a/pym/portage/locks.py +++ b/pym/portage/locks.py @@ -74,7 +74,7 @@ def lockfile(mypath, wantnewlockfile=0, unlinkfile=0, if os.stat(lockfilename).st_gid != portage_gid: os.chown(lockfilename, -1, portage_gid) except OSError, e: - if e.errno == errno.ENOENT: # No such file or directory + if e.errno in (errno.ENOENT, errno.ESTALE): return lockfile(mypath, wantnewlockfile=wantnewlockfile, unlinkfile=unlinkfile, waiting_msg=waiting_msg, @@ -164,7 +164,7 @@ def _fstat_nlink(fd): try: return os.fstat(fd).st_nlink except EnvironmentError, e: - if e.errno == errno.ENOENT: + if e.errno in (errno.ENOENT, errno.ESTALE): # Some filesystems such as CIFS return # ENOENT which means st_nlink == 0. return 0 -- cgit v1.2.3-1-g7c22