From de4a53d191162b388bad3621f7568effc9c939f7 Mon Sep 17 00:00:00 2001 From: Alec Warner Date: Tue, 16 Jan 2007 00:49:29 +0000 Subject: fix minor syntax issues with locking svn path=/main/trunk/; revision=5660 --- pym/portage_news.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pym') diff --git a/pym/portage_news.py b/pym/portage_news.py index f02b7938f..ea804f31b 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") -- cgit v1.2.3-1-g7c22