conftypes: Expand user in Directory
This commit is contained in:
parent
3b93f6121b
commit
857533aca7
@ -795,6 +795,7 @@ class Directory(BaseType):
|
|||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
raise ValidationError(value, "may not be empty!")
|
raise ValidationError(value, "may not be empty!")
|
||||||
|
value = os.path.expanduser(value)
|
||||||
if not os.path.isdir(value):
|
if not os.path.isdir(value):
|
||||||
raise ValidationError(value, "must be a valid directory!")
|
raise ValidationError(value, "must be a valid directory!")
|
||||||
if not os.path.isabs(value):
|
if not os.path.isabs(value):
|
||||||
|
Loading…
Reference in New Issue
Block a user