string from URF-8 encoded files have not the "unicode" type

This commit is contained in:
Zykino 2018-11-28 00:50:38 +01:00
parent 8d8898aa55
commit f66ba6cc21
2 changed files with 5 additions and 4 deletions

View file

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