From 3905884a84ac2a41d8296bfb1e6c714efce44eed Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 24 Nov 2015 17:24:14 +0100 Subject: [PATCH] Disable all QWebSettings storage when quitting. This hopefully helps with issues on the Windows buildbot: Error in atexit._run_exitfuncs: Traceback (most recent call last): File "C:\Users\florian\buildbot\slave\win8\build\.tox\py34\lib\shutil.py", line 371, in _rmtree_unsafe os.unlink(fullname) PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\florian\\AppData\\Local\\Temp\\qutebrowser-basedir-ixuexfeu\\data\\local-storage\\qrc__0.localstorage' --- qutebrowser/app.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qutebrowser/app.py b/qutebrowser/app.py index faae410e3..9e333f86d 100644 --- a/qutebrowser/app.py +++ b/qutebrowser/app.py @@ -692,8 +692,10 @@ class Quitter: error.handle_fatal_exc( e, self._args, "Error while saving!", pre_text="Error while saving {}".format(key)) - # Disable favicons so removing tempdir will work - QWebSettings.setIconDatabasePath("") + # Disable storage so removing tempdir will work + QWebSettings.setIconDatabasePath('') + QWebSettings.setOfflineWebApplicationCachePath('') + QWebSettings.globalSettings().setLocalStoragePath('') # Re-enable faulthandler to stdout, then remove crash log log.destroy.debug("Deactivating crash log...") objreg.get('crash-handler').destroy_crashlogfile()