From d82702206b46c6e5cf93de52887a9a062399b24a Mon Sep 17 00:00:00 2001 From: albertosottile Date: Wed, 20 Jun 2018 15:15:45 +0200 Subject: [PATCH] Fix settings crash when switching back from Python 3 versions --- syncplay/utils.py | 7 +++++++ 1 file changed, 7 insertions(+) mode change 100644 => 100755 syncplay/utils.py diff --git a/syncplay/utils.py b/syncplay/utils.py old mode 100644 new mode 100755 index 5ad8b6c..24e207c --- a/syncplay/utils.py +++ b/syncplay/utils.py @@ -339,7 +339,14 @@ def getPlayerArgumentsByPathAsText(arguments, path): argsToReturn = getPlayerArgumentsByPathAsArray(arguments, path) return " ".join(argsToReturn) if argsToReturn else "" +def unicodeReplaceFromFuture(s): + return ''.join(chr(ord(c)) for c in s).decode('utf-8') + def getListAsMultilineString(pathArray): + try: + pathArray = map(unicodeReplaceFromFuture, pathArray) + except: + pass return u"\n".join(pathArray) if pathArray else "" def convertMultilineStringToList(multilineString):