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.
|
# Types we are sure we handle correctly below.
|
||||||
assert typ in [
|
assert typ in [
|
||||||
QStandardPaths.ConfigLocation, QStandardPaths.AppDataLocation,
|
QStandardPaths.ConfigLocation, QStandardPaths.DataLocation,
|
||||||
QStandardPaths.DataLocation, QStandardPaths.CacheLocation,
|
QStandardPaths.CacheLocation, QStandardPaths.DownloadLocation,
|
||||||
QStandardPaths.DownloadLocation, QStandardPaths.RuntimeLocation,
|
QStandardPaths.RuntimeLocation, QStandardPaths.TempLocation,
|
||||||
QStandardPaths.TempLocation], typ_str
|
# FIXME old Qt
|
||||||
|
getattr(QStandardPaths, 'AppDataLocation', object())], typ_str
|
||||||
|
|
||||||
with qtutils.unset_organization():
|
with qtutils.unset_organization():
|
||||||
path = QStandardPaths.writableLocation(typ)
|
path = QStandardPaths.writableLocation(typ)
|
||||||
|
@ -27,7 +27,6 @@ import types
|
|||||||
import textwrap
|
import textwrap
|
||||||
import collections
|
import collections
|
||||||
import logging
|
import logging
|
||||||
import textwrap
|
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from PyQt5.QtCore import QStandardPaths
|
from PyQt5.QtCore import QStandardPaths
|
||||||
|
Loading…
Reference in New Issue
Block a user