Add some more logging for standarddir
This commit is contained in:
parent
e6334e196c
commit
20f80610be
@ -25,7 +25,7 @@ import os.path
|
|||||||
|
|
||||||
from PyQt5.QtCore import QCoreApplication, QStandardPaths
|
from PyQt5.QtCore import QCoreApplication, QStandardPaths
|
||||||
|
|
||||||
from qutebrowser.utils import log, qtutils
|
from qutebrowser.utils import log, qtutils, debug
|
||||||
|
|
||||||
|
|
||||||
# The argparse namespace passed to init()
|
# The argparse namespace passed to init()
|
||||||
@ -124,6 +124,8 @@ def _writable_location(typ):
|
|||||||
"""Wrapper around QStandardPaths.writableLocation."""
|
"""Wrapper around QStandardPaths.writableLocation."""
|
||||||
with qtutils.unset_organization():
|
with qtutils.unset_organization():
|
||||||
path = QStandardPaths.writableLocation(typ)
|
path = QStandardPaths.writableLocation(typ)
|
||||||
|
typ_str = debug.qenum_key(QStandardPaths, typ)
|
||||||
|
log.misc.debug("writable location for {}: {}".format(typ_str, path))
|
||||||
if not path:
|
if not path:
|
||||||
raise ValueError("QStandardPaths returned an empty value!")
|
raise ValueError("QStandardPaths returned an empty value!")
|
||||||
# Qt seems to use '/' as path separator even on Windows...
|
# Qt seems to use '/' as path separator even on Windows...
|
||||||
|
Loading…
Reference in New Issue
Block a user