summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Warner <antarus@gentoo.org>2007-01-16 00:49:29 +0000
committerAlec Warner <antarus@gentoo.org>2007-01-16 00:49:29 +0000
commitde4a53d191162b388bad3621f7568effc9c939f7 (patch)
tree77094557a84691e71025eb904ee15a3d87c1a923
parentmerge didn't bring in portage_news, no idea why (diff)
downloadportage-multirepo-de4a53d191162b388bad3621f7568effc9c939f7.tar.gz
portage-multirepo-de4a53d191162b388bad3621f7568effc9c939f7.tar.bz2
portage-multirepo-de4a53d191162b388bad3621f7568effc9c939f7.zip
fix minor syntax issues with locking
svn path=/main/trunk/; revision=5660
-rw-r--r--pym/portage_news.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pym/portage_news.py b/pym/portage_news.py
index f02b7938..ea804f31 100644
--- a/pym/portage_news.py
+++ b/pym/portage_news.py
@@ -74,13 +74,13 @@ class NewsManager(object):
del path
path = os.path.join( self.UNREAD_PATH, "news-" + repoid + ".unread" )
- lockfile( path )
+ unread_lock = lockfile( path )
unread_file = open( path, "a" )
for item in updates:
unread_file.write( item.path + "\n" )
unread_file.close()
- unlockfile(path)
+ unlockfile(unread_lock)
# Touch the timestamp file
f = open(self.TIMESTAMP_PATH, "w")
@@ -98,12 +98,12 @@ class NewsManager(object):
self.updateItems( repoid )
unreadfile = os.path.join( self.UNREAD_PATH, "news-"+ repoid +".unread" )
- lockfile(unreadfile)
+ unread_lock = lockfile(unreadfile)
if os.path.exists( unreadfile ):
unread = open( unreadfile ).readlines()
if len(unread):
return len(unread)
- unlockfile(unread)
+ unlockfile(unread_lock)
_installedRE = re.compile("Display-If-Installed:(.*)\n")
_profileRE = re.compile("Display-If-Profile:(.*)\n")