From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 5335B138A2F for ; Fri, 24 Jan 2014 21:45:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 632C7E09C3; Fri, 24 Jan 2014 21:45:29 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EA83BE09C3 for ; Fri, 24 Jan 2014 21:45:28 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E811433EEE2 for ; Fri, 24 Jan 2014 21:45:27 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 7CA1A183B3 for ; Fri, 24 Jan 2014 21:45:26 +0000 (UTC) From: "Devan Franchini" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Devan Franchini" Message-ID: <1390599482.ff4cdefb600c0ceb834019bbcd0e1147ea744d6b.twitch153@gentoo> Subject: [gentoo-commits] proj/webapp-config:experimental commit in: WebappConfig/ X-VCS-Repository: proj/webapp-config X-VCS-Files: WebappConfig/db.py X-VCS-Directories: WebappConfig/ X-VCS-Committer: twitch153 X-VCS-Committer-Name: Devan Franchini X-VCS-Revision: ff4cdefb600c0ceb834019bbcd0e1147ea744d6b X-VCS-Branch: experimental Date: Fri, 24 Jan 2014 21:45:26 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 771b2919-98a5-4fee-b214-697a2109ae58 X-Archives-Hash: 7c31adc791f01de984939fc9c50c768b commit: ff4cdefb600c0ceb834019bbcd0e1147ea744d6b Author: Devan Franchini gentoo org> AuthorDate: Fri Jan 24 21:38:02 2014 +0000 Commit: Devan Franchini gentoo org> CommitDate: Fri Jan 24 21:38:02 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/webapp-config.git;a=commit;h=ff4cdefb WebappConfig/db.py: Properly closes install file after writing. When webapp-config cleans out a webapp installation it needs to remove the database entry of the file from it's designated installs file. If more than one database entry is in the installs file it should still list the database entry for the webapp that isn't being removed. The logic is all there in db.py but after the file has rewritten the entries it doesn't close the file properly and causes a failure in the check right after the write(), which then unlinks the installs file and removes the entries from webapp-config's database. X-Gentoo-Bug:494520 X-Gentoo-Bug-URL: https://bugs.gentoo.org/494520 --- WebappConfig/db.py | 1 + 1 file changed, 1 insertion(+) diff --git a/WebappConfig/db.py b/WebappConfig/db.py index 228b2c8..2d70cb9 100644 --- a/WebappConfig/db.py +++ b/WebappConfig/db.py @@ -340,6 +340,7 @@ class WebappDB(AppHierarchy): if not self.__p: installs = open(dbpath, 'w') installs.write('\n'.join(newentries) + '\n') + installs.close() if not self.has_installs(): os.unlink(dbpath) else: