Browse Source

prevent decoding unicode strings since python prefer to crash than doing nothing

pull/34/head
Zykino 5 years ago
committed by Rigel Kent
parent
commit
33e55bc18e
Signed by untrusted user: rigelk GPG Key ID: EA12971B0E438F36
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      lib/utils.py

+ 4
- 0
lib/utils.py View File

@ -199,6 +199,10 @@ def cleanString(toclean):
return cleaned
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:
options["--name"] = options["--name"].decode(encoding)

Loading…
Cancel
Save