aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-09-20 11:47:45 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-09-20 11:47:45 +0000
commit199228d412c83e00f0c4af7ba34f166a891b4e87 (patch)
tree8aba71db4ea0e3b6539eccaf1dc0fd9e3920fca1 /pym/portage/locks.py
parentSupport print() function with Python 2 in some files. (diff)
downloadportage-199228d412c83e00f0c4af7ba34f166a891b4e87.tar.gz
portage-199228d412c83e00f0c4af7ba34f166a891b4e87.tar.bz2
portage-199228d412c83e00f0c4af7ba34f166a891b4e87.zip
Update syntax of numbers for compatibility with Python 3.
(2to3-3.1 -f numliterals -nw ${FILES}) svn path=/main/trunk/; revision=14292
Diffstat (limited to 'pym/portage/locks.py')
-rw-r--r--pym/portage/locks.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pym/portage/locks.py b/pym/portage/locks.py
index f2147c5e1..896f948f1 100644
--- a/pym/portage/locks.py
+++ b/pym/portage/locks.py
@@ -64,7 +64,7 @@ def lockfile(mypath, wantnewlockfile=0, unlinkfile=0,
old_mask = os.umask(000)
try:
try:
- myfd = os.open(lockfilename, os.O_CREAT|os.O_RDWR, 0660)
+ myfd = os.open(lockfilename, os.O_CREAT|os.O_RDWR, 0o660)
except OSError as e:
func_call = "open('%s')" % lockfilename
if e.errno == OperationNotPermitted.errno:
@@ -201,7 +201,7 @@ def unlockfile(mytuple):
try:
if myfd is None:
- myfd = os.open(lockfilename, os.O_WRONLY,0660)
+ myfd = os.open(lockfilename, os.O_WRONLY,0o660)
unlinkfile = 1
locking_method(myfd,fcntl.LOCK_UN)
except OSError:
@@ -268,7 +268,7 @@ def hardlink_lockfile(lockfilename, max_wait=14400):
while(time.time() < (start_time + max_wait)):
# We only need it to exist.
- myfd = os.open(myhardlock, os.O_CREAT|os.O_RDWR,0660)
+ myfd = os.open(myhardlock, os.O_CREAT|os.O_RDWR,0o660)
os.close(myfd)
if not os.path.exists(myhardlock):