The strings arguments should be in unicode

This commit is contained in:
Zykino 2018-11-11 16:52:48 +01:00
parent 6c68c3363b
commit 8d8898aa55

View file

@ -167,17 +167,17 @@ if __name__ == '__main__':
schema = Schema({ schema = Schema({
'--file': And(str, validateVideo, error='file is not supported, please use mp4'), '--file': And(str, validateVideo, error='file is not supported, please use mp4'),
Optional('--name'): Or(None, And( Optional('--name'): Or(None, And(
str, unicode,
lambda x: not x.isdigit(), lambda x: not x.isdigit(),
error="The video name should be a string") error="The video name should be a string")
), ),
Optional('--description'): Or(None, And( Optional('--description'): Or(None, And(
str, unicode,
lambda x: not x.isdigit(), lambda x: not x.isdigit(),
error="The video description should be a string") error="The video description should be a string")
), ),
Optional('--tags'): Or(None, And( Optional('--tags'): Or(None, And(
str, unicode,
lambda x: not x.isdigit(), lambda x: not x.isdigit(),
error="Tags should be a string") error="Tags should be a string")
), ),