Remove the CLI input decoding

This commit is contained in:
Zykino 2020-01-18 14:53:32 +01:00
parent aa7aeed688
commit 8c99747898
2 changed files with 0 additions and 15 deletions

View file

@ -196,17 +196,3 @@ def cleanString(toclean):
cleaned = re.sub('[^A-Za-z0-9]+', '', toclean)
return cleaned
def decodeArgumentStrings(options, encoding):
# Python crash when decoding from UTF-8 to UTF-8, so we prevent this
if "utf-8" == encoding.lower():
return;
if options["--name"] is not None:
options["--name"] = options["--name"].decode(encoding)
if options["--description"] is not None:
options["--description"] = options["--description"].decode(encoding)
if options["--tags"] is not None:
options["--tags"] = options["--tags"].decode(encoding)

View file

@ -223,7 +223,6 @@ if __name__ == '__main__':
'--version': bool
})
utils.decodeArgumentStrings(options, locale.getpreferredencoding())
options = utils.parseNFO(options)
if not options.get('--thumbnail'):