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:
Lamar Pavel 2015-05-23 16:09:44 +02:00
parent 61f32b3e9b
commit 93b92f4aab

View File

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