From df9726a1524a433a21e902968fd030881dc3d90b Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 17 Sep 2017 00:13:24 +0200 Subject: [PATCH] Fix standarddir without AppDataLocation --- qutebrowser/utils/standarddir.py | 9 +++++---- tests/unit/utils/test_standarddir.py | 1 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/qutebrowser/utils/standarddir.py b/qutebrowser/utils/standarddir.py index 61297796e..5e5da849a 100644 --- a/qutebrowser/utils/standarddir.py +++ b/qutebrowser/utils/standarddir.py @@ -193,10 +193,11 @@ def _writable_location(typ): # Types we are sure we handle correctly below. assert typ in [ - QStandardPaths.ConfigLocation, QStandardPaths.AppDataLocation, - QStandardPaths.DataLocation, QStandardPaths.CacheLocation, - QStandardPaths.DownloadLocation, QStandardPaths.RuntimeLocation, - QStandardPaths.TempLocation], typ_str + QStandardPaths.ConfigLocation, QStandardPaths.DataLocation, + QStandardPaths.CacheLocation, QStandardPaths.DownloadLocation, + QStandardPaths.RuntimeLocation, QStandardPaths.TempLocation, + # FIXME old Qt + getattr(QStandardPaths, 'AppDataLocation', object())], typ_str with qtutils.unset_organization(): path = QStandardPaths.writableLocation(typ) diff --git a/tests/unit/utils/test_standarddir.py b/tests/unit/utils/test_standarddir.py index ffeef58f2..621a00902 100644 --- a/tests/unit/utils/test_standarddir.py +++ b/tests/unit/utils/test_standarddir.py @@ -27,7 +27,6 @@ import types import textwrap import collections import logging -import textwrap import subprocess from PyQt5.QtCore import QStandardPaths