os.chown(lockfilename,os.getuid(),portage_gid)
except OSError, e:
if e[0] == 2: # No such file or directory
- return lockfile(mypath,wantnewlockfile,unlinkfile)
+ return lockfile(mypath, wantnewlockfile=wantnewlockfile,
+ unlinkfile=unlinkfile, waiting_msg=waiting_msg)
else:
writemsg("Cannot chown a lockfile. This could cause inconvenience later.\n");
os.umask(old_mask)
# The file was deleted on us... Keep trying to make one...
os.close(myfd)
writemsg("lockfile recurse\n",1)
- lockfilename,myfd,unlinkfile,locking_method = lockfile(mypath,wantnewlockfile,unlinkfile)
+ lockfilename, myfd, unlinkfile, locking_method = lockfile(
+ mypath, wantnewlockfile=wantnewlockfile, unlinkfile=unlinkfile,
+ waiting_msg=waiting_msg)
writemsg(str((lockfilename,myfd,unlinkfile))+"\n",1)
return (lockfilename,myfd,unlinkfile,locking_method)