Fix tox failure regarding exceptions in transform
Function transform is not supposed to raise exceptions, so I wrapped the call to os.path.join in an if-clause to test if standarddir.config returns a valid value.
This commit is contained in:
parent
61f32b3e9b
commit
93b92f4aab
@ -1158,9 +1158,10 @@ class UserStyleSheet(File):
|
||||
path = os.path.expandvars(value)
|
||||
path = os.path.expanduser(path)
|
||||
if not os.path.isabs(path):
|
||||
abspath = os.path.join(standarddir.config(), path)
|
||||
if os.path.isfile(abspath):
|
||||
path = abspath
|
||||
if standarddir.config():
|
||||
abspath = os.path.join(standarddir.config(), path)
|
||||
if os.path.isfile(abspath):
|
||||
path = abspath
|
||||
if os.path.isabs(path):
|
||||
return QUrl.fromLocalFile(path)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user