parent
e54d3c21ee
commit
9521d253a1
@ -937,13 +937,13 @@ class ShellCommand(BaseType):
|
|||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
raise configexc.ValidationError(value, "may not be empty!")
|
raise configexc.ValidationError(value, "may not be empty!")
|
||||||
if self.placeholder and '{}' not in self.transform(value):
|
|
||||||
raise configexc.ValidationError(value, "needs to contain a "
|
|
||||||
"{}-placeholder.")
|
|
||||||
try:
|
try:
|
||||||
shlex.split(value)
|
shlex.split(value)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
raise configexc.ValidationError(value, str(e))
|
raise configexc.ValidationError(value, str(e))
|
||||||
|
if self.placeholder and '{}' not in self.transform(value):
|
||||||
|
raise configexc.ValidationError(value, "needs to contain a "
|
||||||
|
"{}-placeholder.")
|
||||||
|
|
||||||
def transform(self, value):
|
def transform(self, value):
|
||||||
if not value:
|
if not value:
|
||||||
|
Loading…
Reference in New Issue
Block a user