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