Fix standarddir without AppDataLocation

This commit is contained in:
Florian Bruhin 2017-09-17 00:13:24 +02:00
parent 9354297276
commit df9726a152
2 changed files with 5 additions and 5 deletions

View File

@ -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)

View File

@ -27,7 +27,6 @@ import types
import textwrap
import collections
import logging
import textwrap
import subprocess
from PyQt5.QtCore import QStandardPaths