Fix bug; all tox tests succeed
My logic in the validate function of class UserStyleSheet was faulty and caused the check for encoding to be skipped. This is now fixed and all tests run successfully.
This commit is contained in:
parent
93b92f4aab
commit
ad7920dda1
@ -1176,12 +1176,11 @@ class UserStyleSheet(File):
|
||||
raise configexc.ValidationError(value, "may not be empty!")
|
||||
value = os.path.expandvars(value)
|
||||
value = os.path.expanduser(value)
|
||||
if not os.path.isabs(value):
|
||||
abspath = os.path.join(standarddir.config(), value)
|
||||
if os.path.isfile(abspath):
|
||||
value = abspath
|
||||
try:
|
||||
if not os.path.isabs(value):
|
||||
abspath = os.path.join(standarddir.config(), value)
|
||||
if os.path.isfile(abspath):
|
||||
return
|
||||
# probably a CSS, so we don't handle it as filename.
|
||||
# FIXME We just try if it is encodable, maybe we should
|
||||
# validate CSS?
|
||||
|
Loading…
Reference in New Issue
Block a user