mirror of
https://git.lecygnenoir.info/LecygneNoir/prismedia.git
synced 2025-10-03 09:29:16 +02:00
prevent decoding unicode strings since python prefer to crash than doing nothing
This commit is contained in:
parent
617e989154
commit
6c68c3363b
1 changed files with 4 additions and 0 deletions
|
@ -206,6 +206,10 @@ def cleanString(toclean):
|
||||||
return cleaned
|
return cleaned
|
||||||
|
|
||||||
def decodeArgumentStrings(options, encoding):
|
def decodeArgumentStrings(options, encoding):
|
||||||
|
# Python crash when decding from UTF-8 to UTF-8, so we prevent this
|
||||||
|
if "utf-8" == encoding.lower():
|
||||||
|
return;
|
||||||
|
|
||||||
if options["--name"] is not None:
|
if options["--name"] is not None:
|
||||||
options["--name"] = options["--name"].decode(encoding)
|
options["--name"] = options["--name"].decode(encoding)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue