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 14423138985 for ; Tue, 12 Feb 2013 03:40:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CC8A021C00E; Tue, 12 Feb 2013 03:40:12 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5ECC021C00E for ; Tue, 12 Feb 2013 03:40:12 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6878633E654 for ; Tue, 12 Feb 2013 03:40:10 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 92AF1E4073 for ; Tue, 12 Feb 2013 03:40:08 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1360640354.ac3067b0dfbed842035c29a2200ecef1635037eb.blueness@gentoo> Subject: [gentoo-commits] proj/webapp-config:master commit in: WebappConfig/ X-VCS-Repository: proj/webapp-config X-VCS-Files: WebappConfig/db.py X-VCS-Directories: WebappConfig/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: ac3067b0dfbed842035c29a2200ecef1635037eb X-VCS-Branch: master Date: Tue, 12 Feb 2013 03:40:08 +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: d5427bd5-da5c-4ac6-af90-05e8ebe228dc X-Archives-Hash: f23ee4b2fd141c6dde67063bd136e07f commit: ac3067b0dfbed842035c29a2200ecef1635037eb Author: Eray Aslan gentoo org> AuthorDate: Tue Feb 12 03:36:55 2013 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Tue Feb 12 03:39:14 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/webapp-config.git;a=commit;h=ac3067b0 WebappConfig/db.py: do not leave behind stray install files Thanks Devan Franchini hotmail.com> for testing. X-Gentoo-Bug: 213130 X-Gentoo-Bug-URL: https://bugs.gentoo.org/213130 Reported-by: Priit Laes plaes.org> Signed-off-by: Anthony G. Basile gentoo.org> --- WebappConfig/db.py | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/WebappConfig/db.py b/WebappConfig/db.py index c925792..37223d0 100644 --- a/WebappConfig/db.py +++ b/WebappConfig/db.py @@ -340,6 +340,8 @@ class WebappDB(AppHierarchy): if not self.__p: installs = open(dbpath, 'w') installs.write('\n'.join(newentries) + '\n') + if not self.has_installs(): + os.unlink(dbpath) else: OUT.info('Pretended to remove installation ' + installdir) OUT.info('Final DB content:\n' + '\n'.join(newentries) + '\n')