Description: Remove temporary directory at shutdown Origin: Debian Bug-Debian: #431845 Forwarded: http://developer.berlios.de/bugs/?func=detailbug&bug_id=15896&group_id=4490 Index: qa-assistant-0.4.90.5/src/gnomeglade.py =================================================================== --- qa-assistant-0.4.90.5.orig/src/gnomeglade.py 2009-06-20 18:02:59.000000000 +0200 +++ qa-assistant-0.4.90.5/src/gnomeglade.py 2009-06-20 18:03:18.000000000 +0200 @@ -24,6 +24,9 @@ import gnome import gnome.ui import gettext +import gconf +import qaglobals +from shutil import rmtree import paths @@ -111,6 +114,19 @@ """ gtk.main() + # Remove temporary directrory. + gconfClient = gconf.client_get_default() + gconfClient.add_dir(qaglobals.GCONFPREFIX, gconf.CLIENT_PRELOAD_NONE) + key = qaglobals.GCONFPREFIX + '/files/user-state-dir' + try: + stateDir = gconfClient.get_string(key) + except gobject.GError: + stateDir = gconfClient.get_default_from_schema(key).get_string() + stateDir = os.path.expanduser(stateDir) + if os.path.isdir(stateDir): + rmtree(stateDir) + + def quit(self, *args): """Signal the gtk main loop to quit. """