diff options
author | Eray Aslan <eras@gentoo.org> | 2013-02-11 22:36:55 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2013-02-11 22:39:14 -0500 |
commit | ac3067b0dfbed842035c29a2200ecef1635037eb (patch) | |
tree | 3034bb3906b2b6b4dd81613576ac69ee49162089 | |
parent | Include current version of the eclass in repo (diff) | |
download | webapp-config-ac3067b0dfbed842035c29a2200ecef1635037eb.tar.gz webapp-config-ac3067b0dfbed842035c29a2200ecef1635037eb.tar.bz2 webapp-config-ac3067b0dfbed842035c29a2200ecef1635037eb.zip |
WebappConfig/db.py: do not leave behind stray install files
Thanks Devan Franchini <twitch153@hotmail.com> for testing.
X-Gentoo-Bug: 213130
X-Gentoo-Bug-URL: https://bugs.gentoo.org/213130
Reported-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
-rw-r--r-- | 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') |