Fix standarddir without AppDataLocation
This commit is contained in:
parent
9354297276
commit
df9726a152
@ -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)
|
||||
|
@ -27,7 +27,6 @@ import types
|
||||
import textwrap
|
||||
import collections
|
||||
import logging
|
||||
import textwrap
|
||||
import subprocess
|
||||
|
||||
from PyQt5.QtCore import QStandardPaths
|
||||
|
Loading…
Reference in New Issue
Block a user