From 199228d412c83e00f0c4af7ba34f166a891b4e87 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Sun, 20 Sep 2009 11:47:45 +0000 Subject: Update syntax of numbers for compatibility with Python 3. (2to3-3.1 -f numliterals -nw ${FILES}) svn path=/main/trunk/; revision=14292 --- pym/portage/locks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pym/portage/locks.py') 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): -- cgit v1.2.3-1-g7c22